Giter Club home page Giter Club logo

Comments (7)

Lollitor avatar Lollitor commented on August 27, 2024

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.

flownt avatar flownt commented on August 27, 2024

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.

Lollitor avatar Lollitor commented on August 27, 2024

Thank you for the insight! I will look into this and investigate further, after I will update here. Appreciate the guidance!

from pandas.

rhshadrach avatar rhshadrach commented on August 27, 2024

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.

KevsterAmp avatar KevsterAmp commented on August 27, 2024

Take

from pandas.

KevsterAmp avatar KevsterAmp commented on August 27, 2024

I'd like to work on this, thanks

from pandas.

flownt avatar flownt commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.