-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
tm.makeObjectSeries returns a Series with dtype="datetime64[ns]" #28378
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
Comments
Hi, I want to contribute to this issue. Is it okay just add |
Yea I think OK to start with that and see what breaks. Ideally may want to have it contain more than date time objects but not sure what effort that would take; just getting it to object dtype in the first place will be a good start |
I modified it to object. But performing add at Series, it modifies dates and dtype as datetime64. How can I forcibly prevent add/sub operator from modifying data and dtype? |
Can you be more specific about what you mean by "performing add at Series"? |
I mean, at I simulated it manually, it manipulates Series with
|
what happens if you forget the datetimes altogether and fill it with strings? |
It passes tests. If I change
|
Is it okay to change filling data as |
Probably, yes. The one thing I want to double-check is that we aren't losing coverage for cases where we actually do want a datetime64 Series, which I think might be the case in the arithmetic test. @WillAyd thoughts on how to track this down more generally? grepping shows only 11 usages of makeObjectSeries, but some of those are in fixtures. |
As I searched, there is no usecase that I searched it including |
Yea I think @jmg7173 if you can search for the fixture where this is used and check that as well would be helpful. Mostly could just change and see what breaks though. The naming of this obviously means the intent is to deal with object data, so I don't think should break too much actually making this return an object dtype |
Here's list where this is used:
As you say, there is no breaks at test. Even though tests are passed, I think I'll make PR about this issue! |
Awesome - thanks for digging into this |
@jbrockmendel and I were both surprised that calling
makeObjectSeries
returns a Series with a datetime dtype. I think it would be more logical for this function to actually return an object dtype SeriesThe text was updated successfully, but these errors were encountered: