Comments (4)
Tried to reproduce. Your example for .round on a Series fails for me as well, however rounding single timedeltas (e.g. pd.Timedelta('1 days 23:18:00').round('d')
) works fine.
from pandas.
Thanks for the report! Result of a git bisect:
commit 6dbeeb4009bbfac5ea1ae2111346f5e9f05b81f4
Author: Lumberbot (aka Jack)
Date: Mon Jan 8 23:24:22 2024 +0100
Backport PR #56767 on branch 2.2.x (BUG: Series.round raising for nullable bool dtype) (#56782)
Backport PR #56767: BUG: Series.round raising for nullable bool dtype
Co-authored-by: Patrick Hoefler
cc @phofl
Note that ser.dt.round('d')
still works. I don't believe that Series.round
having special logic for different dtypes is documented anywhere.
from pandas.
Yeah this is a bit weird, DataFrame.round never worked for those, Series.round now follows this behavior. We can either make both work or keep as is
from pandas.
Making this work for DataFrame.round seems undesirable - numeric columns would take the number of digits as an argument whereas timedelta/datetime would take a frequency. I'd lean toward keeping this as-is.
from pandas.
Related Issues (20)
- BUG: GroupBy.apply with as_index=False still produces a MultiIndex HOT 4
- BUG: `All arrays must be of the same length` fatal error using `pd.read_json()` HOT 5
- REGR?: ExponentialMovingWindow.aggregate raises on main with np.mean
- BUG: Series constructor loses date unit of Timestamps HOT 2
- BUG: .loc with DateTimeIndex allows day first string for stop in slice, but not start
- ENH: read_parquet as a class method HOT 1
- BUG: combine_first raise FutureWarning surprisingly HOT 4
- ENH: An option to stop appending .0 to strings if null is present in json HOT 1
- BUG: .loc Indexing with pyarrow backed DatetimeIndex does not allow string comparison HOT 4
- ENH: Downsampling pyarrow backed DatetimeIndex should potentially return date32 instead of timestamp HOT 4
- What's the design decision regarding whether operations can return another backend's object? HOT 2
- QST: Why is subtracting pandas.timedelta from pandas.date not vectorized? HOT 7
- BUG: loc __setitem__ uses empty byte values for column unknowns when both rows and columns are added/DataFrame is enlarged
- BUG: loc __setitem__ has incorrect behavior when assigned a DataFrame and new columns and duplicated columns are added.
- ENH: GroupBy.transform should accept similar arguments to GroupBy.agg HOT 5
- BUG: Using `Series.diff()` on a Series with Periods on Windows shows an overflow error HOT 1
- BUG: Series.str.split broken with pyarrow strings and regex argument HOT 3
- DOC: Style extensibility doc links to invalid ecosystem page
- BUG: get_level_values() in a MultiIndex returns DatetimeIndex without frequency even though the index level has a frequency (and unique values). HOT 4
- BUG: incorrect assumption of full-name month format when "May" is initial month HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandas.