Giter Site home page Giter Site logo

BUG: about pandas HOT 3 OPEN

cs-ranbi avatar cs-ranbi commented on June 24, 2024
BUG:

from pandas.

Comments (3)

Aloqeely avatar Aloqeely commented on June 24, 2024

Thanks for the report! The problem is caused because your DataFrame index did not have a name so it gets set a default name of index when using to_json(orient="table"), but you also have another column with the name index, so 2 index fields were saved.

You can fix this issue by renaming your index column or by setting a name for the actual index using df.rename_axis

PRs to fix this are welcome if they don't complicate the logic too much.

from pandas.

taranarmo avatar taranarmo commented on June 24, 2024

take

from pandas.

taranarmo avatar taranarmo commented on June 24, 2024

I made this case to fail on check whether index.name is in columns names as the easiest solution. The others would change the names of user's columns or invent other generic names of nameless 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.