cositools / cosipy

The COSI high-level data analysis tools
Apache License 2.0
3 stars 16 forks source link

'delim_whitespace' keyword in pd.read_csv is deprecated #166

Open nmik opened 3 months ago

nmik commented 3 months ago

While running DataIO tutorial I got this working:

WARNING FutureWarning: The 'delim_whitespace' keyword in pd.read_csv is deprecated and will be removed in a future version. Use ``sep='\s+'`` instead

A possible solution to avoid issues in the future is to substitute this:

df = pd.read_csv("crab_lc.dat", delim_whitespace=True)

with this:

df = pd.read_csv("crab_lc.dat", sep='\t')

israelmcmc commented 3 months ago

Thanks for reporting @nmik. I think this is coming from a dependency since I don't see this code (pd.read_csv) in cosipy. Can you please post the traceback?

nmik commented 3 months ago

Oh apologies, I just realized this might be more an issue to be opened on the DC2 repository.

The code is indeed in https://github.com/cositools/cosipy/tree/main/docs/tutorials/DataIO/DataIO_example.ipynb

israelmcmc commented 3 months ago

Oh, that's all right @nmik, I think this is the right place to report this. I just think there's nothing we can do about this until one of the libraries we use updates their code. In the meanwhile, I just added the label "dependencies" to keep track of this in case it gave us trouble later (the warning becomes an error).