Comments (1)
Thanks for the report, but this a limitation of converting floating point precision back to integers. Numpy exhibits the same behavior
In [1]: import numpy as np
In [2]: np.array([995279394541916024+i for i in range(128)]).astype('int64')
Out[2]:
array([995279394541916024, 995279394541916025, 995279394541916026,
995279394541916027, 995279394541916028, 995279394541916029,
995279394541916030, 995279394541916031, 995279394541916032,
995279394541916033, 995279394541916034, 995279394541916035,
995279394541916036, 995279394541916037, 995279394541916038,
995279394541916039, 995279394541916040, 995279394541916041,
995279394541916042, 995279394541916043, 995279394541916044,
995279394541916045, 995279394541916046, 995279394541916047,
995279394541916048, 995279394541916049, 995279394541916050,
995279394541916051, 995279394541916052, 995279394541916053,
995279394541916054, 995279394541916055, 995279394541916056,
995279394541916057, 995279394541916058, 995279394541916059,
995279394541916060, 995279394541916061, 995279394541916062,
995279394541916063, 995279394541916064, 995279394541916065,
995279394541916066, 995279394541916067, 995279394541916068,
995279394541916069, 995279394541916070, 995279394541916071,
995279394541916072, 995279394541916073, 995279394541916074,
995279394541916075, 995279394541916076, 995279394541916077,
995279394541916078, 995279394541916079, 995279394541916080,
995279394541916081, 995279394541916082, 995279394541916083,
995279394541916084, 995279394541916085, 995279394541916086,
995279394541916087, 995279394541916088, 995279394541916089,
995279394541916090, 995279394541916091, 995279394541916092,
995279394541916093, 995279394541916094, 995279394541916095,
995279394541916096, 995279394541916097, 995279394541916098,
995279394541916099, 995279394541916100, 995279394541916101,
995279394541916102, 995279394541916103, 995279394541916104,
995279394541916105, 995279394541916106, 995279394541916107,
995279394541916108, 995279394541916109, 995279394541916110,
995279394541916111, 995279394541916112, 995279394541916113,
995279394541916114, 995279394541916115, 995279394541916116,
995279394541916117, 995279394541916118, 995279394541916119,
995279394541916120, 995279394541916121, 995279394541916122,
995279394541916123, 995279394541916124, 995279394541916125,
995279394541916126, 995279394541916127, 995279394541916128,
995279394541916129, 995279394541916130, 995279394541916131,
995279394541916132, 995279394541916133, 995279394541916134,
995279394541916135, 995279394541916136, 995279394541916137,
995279394541916138, 995279394541916139, 995279394541916140,
995279394541916141, 995279394541916142, 995279394541916143,
995279394541916144, 995279394541916145, 995279394541916146,
995279394541916147, 995279394541916148, 995279394541916149,
995279394541916150, 995279394541916151])
In [3]: np.array([995279394541916024+i for i in range(128)]).astype('float64').astype('int64')
Out[3]:
array([995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916032, 995279394541916032, 995279394541916032,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160, 995279394541916160,
995279394541916160, 995279394541916160])
Closing as the expected behavior
from pandas.
Related Issues (20)
- BUG: Reading large CSV files with `pyarrow` when values contain newline character. HOT 2
- DOC: Link to SPEC 0 instead of NEP 29 HOT 2
- BUG: `to_parquet(engine="fastparquet")` can't handle DataFrame with NumPy array values HOT 1
- ENH: new method `Series.struct.assign` to allow adding sub-fields to a struct
- BUG: sort_values with ascending=False is not doing stable sorting
- QST: This library always worked, except with this specific .sav file, anyone could give me a clue on why?
- Potential performance regression with "BUG: Fix issue with negative labels in `group_cumsum` (#58984)"
- BUG: can't support numpy2.2,how to deal with it HOT 7
- BUG: df.all(skipna=False) HOT 2
- BUG: Parameter converters when using the read function.
- BUG: read_parquet wrongly returns empty index if asked to read empty column list HOT 2
- ENH/BUG: pd.date_range() still defaults to nanosecond resolution HOT 1
- ENH: New Name for "numpy_nullable" dtype_backend HOT 1
- BUG: `DatetimeIndex.union` gives wrong result with "datetime64[us]"
- BUILD: Pandas 1.2.5 build no longer works HOT 13
- ENH: .isin() method should use __contains__ rather than __iter__ for user-defined classes to determine presence. HOT 3
- BUG: `pd.read_excel` gives uninformative error for protected files HOT 2
- BUG: eval fails to process expression when one column name starts with a digit or some special characters HOT 1
- BUG: pandas dataframe column definition or mapping does not cater for upper case values. HOT 1
- BUG: HOT 2
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.