GithubHelp home page GithubHelp logo

Comments (5)

ritchie46 avatar ritchie46 commented on June 27, 2024

@stinodego or @MarcoGorelli could you take a look?. I am not sure which recent PR's influenced this one.

from polars.

MarcoGorelli avatar MarcoGorelli commented on June 27, 2024

thanks @d-reynol for the report

Did this ever work in previous versions? I just tried it out in 0.20.3 and it also raises there

from polars.

ritchie46 avatar ritchie46 commented on June 27, 2024

Ok, then we never supported this properly. Sorry for the ping.

from polars.

stinodego avatar stinodego commented on June 27, 2024

We shouldn't panic here, but I'm not sure we should even support this.

You are passing a Python list with some values in it. We need to determine which type those values are, because a Python list isn't strongly typed (unlike a NumPy ndarray or a pandas Series).

We don't know what type those values are, so we do some checks for various possible values we expect. Looks like we don't currently check for pd.NaT. I guess we could. But you can imagine that checking for every possible type of object someone could throw in a list is not feasible.

My advice is to just use None instead, or create a pandas Series with your pd.NaT values and then convert that to Polars.

I will take a look at our constructors to see if we can support this.

from polars.

ritchie46 avatar ritchie46 commented on June 27, 2024

We should not check for pd.Nat in conversion to AnyValue.

from polars.

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.