Comments (7)
Hi,
I noticed this issue and I'd like to help triage and potentially fix it. Is it okay if I proceed with investigating this bug?
Thanks!
from pandas.
Sure! From the outside I would guess the series is processed in batches and accidentally the numeric index into the batch is returned instead of the index of the series element. If you play with the the length of the valid list you'll notice it jumping around but rarely being correct.
from pandas.
Thank you for the insight! I will look into this and investigate further, after I will update here. Appreciate the guidance!
from pandas.
Thanks for the report. It appears to me that duplicates are first removed from the values. It seems easiest to just remove the index from the error message. Further investigations and PRs to fix are welcome!
from pandas.
Take
from pandas.
I'd like to work on this, thanks
from pandas.
Thanks for the report. It appears to me that duplicates are first removed from the values. It seems easiest to just remove the index from the error message. Further investigations and PRs to fix are welcome!
I took some time to look into the code and this seems correct.
The error message comes from:
array_strptime in pandas/pandas/_libs/tslibs/strptime.pyx
which appears to be called indirectly from pandas/pandas/core/tools/datetimes.py:1015
The cause appears to be as @rhshadrach said: the series is first deduplicated by _maybe_cache and only then the date-parsing is applied.
The branches at 1023 and 1029 appear to also be affected.
As a pandas.Series has an index it seems most consistent to me to report the item causing the error by the index.
from pandas.
Related Issues (20)
- module 'pandas' has no attribute '__version__' HOT 5
- DOC: std() delta degree of freedom vs. degree of freedom HOT 2
- BUG: DataFrame.astype(dict) causes mypy error if dict includes 'datetime64[ns]' among mixed types HOT 3
- BUG: Series' lt, gt, le, ge, ne, eq methods are raising a downcasting warning even though the Series' dtype is float64. HOT 2
- Unable to build pandas from source on Windows HOT 12
- BUG: Series.gt (and other comparison methods) can fail with dtype=object HOT 9
- Unit Test/CI failing for multiple PRs HOT 2
- BUG: merging DataFrames on a column containing just NaN values triggers address violation in `safe_sort` HOT 4
- BUG: UnboundLocalError when full outer merging two dataframes HOT 3
- Python 3.13 wheel builds are failing HOT 2
- BUG: Inconsistent behavior between `.any` and `.all` with missing values HOT 1
- BUG: stacked bar graphs show invalid label position due to invalid rectangle bottom when data is 0 HOT 9
- BUG: `isna` on pyarrow backed Series is returning Series with `bool` dtype instead of `bool[pyarrow]` HOT 9
- BUG: dropna in pivot_table is not affecting the outcome
- BUG: pandas.DataFrame.plot crashes, if subplots argument receives a touple. HOT 3
- BUG: assert_frame_equal does not include the obj parameter in error when a MultiIndex is different HOT 4
- QST: How to use 'numba' for group by sum HOT 1
- BUG: Large XML files on Windows trigger false Encoding error HOT 2
- BUG: Series.replace(dict-like, dict-like) raises uninformative AttributeError HOT 1
- BUG: escapechar=',' Causes Double Commas in Output in Pandas 2.2.2 HOT 5
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.