Giter VIP home page Giter VIP logo

Comments (4)

stinodego avatar stinodego commented on September 15, 2024 1

What's in your res variable? Please create a reproducible example - without it, we cannot do much.

I can say that you should probably be using read_database or read_database_uri for this, rather than reading stuff into a cursor and plugging it into the DataFrame constructor.

from polars.

MTisMT avatar MTisMT commented on September 15, 2024

I created the reproducible example in test.json and updated the issue. The error is still there.

from polars.

MTisMT avatar MTisMT commented on September 15, 2024

The problem was solved using by setting infer_schema_length to None, thanks to jqurious

pl.DataFrame(res, infer_schema_length=None)

It seems the error was raised because the default value of infer_schema_length is 100. However, in our data, the type of that column can not be detected until a row is bigger than 100.

from polars.

MTisMT avatar MTisMT commented on September 15, 2024

The error description only suggests increasing the infer_schema_length. Now this error description can be modified:
make sure that all rows have the same schema or consider increasing infer_schema_length or setting infer_schema_length to None. it might also be that a value overflows the data-type's capacity

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.