Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace convert_objects #34

Closed
philipstarkey opened this issue Sep 29, 2017 · 2 comments
Closed

Replace convert_objects #34

philipstarkey opened this issue Sep 29, 2017 · 2 comments

Comments

@philipstarkey
Copy link
Member

Original report (archived issue) by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


There is a deprecation warning that lyse currently throws the first time the dataframe is requested by a analysis routine.

#!python

WARNING lyse: /Users/janwerkmann/labscript_suite/lyse/__main__.py:174: FutureWarning: convert_objects is deprecated.  Use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.
  convert_dates=False, convert_numeric=False, convert_timedeltas=False)

We should maybe replace it?

@philipstarkey
Copy link
Member Author

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Hmm, this looks messy. There's a discussion here about the deprecation. There is now a infer_objects method in pandas, but I don't think that directly replicates what we currently do (I think it will probably convert dates and timedeltas - see the source code for that vs convert_objects).

There is also a _convert method we could use, but that's a little dodgy since it's not part of the exposed API.

@philipstarkey
Copy link
Member Author

Duplicate of #52 and also resolved in 9fac3f5 (BitBucket PR 70)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant