-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: raise on unsupported dtype instead of silently swapping #49285
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
API: raise on unsupported dtype instead of silently swapping #49285
Conversation
doc/source/whatsnew/v2.0.0.rst
Outdated
|
||
*New behavior*: | ||
|
||
In [5]: pd.Series(["2016-01-01"], dtype="datetime64[s]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be in a .. ipython:: python
block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its still not happy here
<<<-------------------------------------------------------------------------
WARNING:
>>>-------------------------------------------------------------------------
Exception in /home/runner/work/pandas/pandas/doc/source/whatsnew/v2.0.0.rst at block ending on line 161
Specify :okexcept: as an option in the ipython:: block to suppress this message
Cell In [6], line 1
TypeError: dtype=datetime64[D] is not supported. Supported resolutions are 's', 'ms', 'us', and 'ns'
^
SyntaxError: invalid syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remote the prompts e.g.
pd.Series(.....)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section should just be
*New behavior*:
.. ipython:: python
pd.Series(["2016-01-01"], dtype="datetime64[s]")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That did it, thanks
@jreback little help with the docbuild? (also thoughts on the API change?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion on doc build. api change lgtm.
doc/source/whatsnew/v2.0.0.rst
Outdated
|
||
*New behavior*: | ||
|
||
In [5]: pd.Series(["2016-01-01"], dtype="datetime64[s]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remote the prompts e.g.
pd.Series(.....)
doc/source/whatsnew/v2.0.0.rst
Outdated
:okexcept: | ||
|
||
In [6]: pd.Series(["2016-01-01"], dtype="datetime64[D]") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the prompts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still getting errors
@jreback still struggling with the docbuild |
Thanks @jbrockmendel |
sweet! the only big constructor-behavior-matching one left is #49348 |
…dev#49285) * API: raise on unsupported dtype instead of silently swapping * lint fixup * ipython blocks * okexcept * troubleshoto doc * jeffs suggestion * troubleshoot docbuild
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Looks like ATM the DataFrame case raises bc it goes through a different path, while the Series case does not.
mentioned in (but this does not close) #48979