Giter Club home page Giter Club logo

Comments (7)

beautah avatar beautah commented on May 18, 2024 1

from dtale.

aschonfeld avatar aschonfeld commented on May 18, 2024

@beautah good catch! I've been meaning to fix that. We saw it when using pd.read_json and if you had JSON objects multiple levels deep it concatenates them with periods in the column name. Thus causing the same issue.

Would you be alright with me simply replacing any periods in column names underscores?

from dtale.

aschonfeld avatar aschonfeld commented on May 18, 2024

I'll let you know when the fix is in. For the time being I think theres a sep argument you can set in pd.json_normalize

from dtale.

jboscolo avatar jboscolo commented on May 18, 2024

I think I am having the same problem with '#' in the column name. I don't think the problem is limited to periods :)

from dtale.

aschonfeld avatar aschonfeld commented on May 18, 2024

@jboscolo, thanks for the heads up! I’m working on a release which includes the other fix. I’ll include this as well and dig into what other characters pandas doesnt like.

from dtale.

aschonfeld avatar aschonfeld commented on May 18, 2024

So it looks like pandas has actually solved this issue, but it won't be available until the release of 1.1.0 commit|issue

that being said, I have found a possible work around that will allow me to not remove special characters (https://stackoverflow.com/questions/40045545/pandas-query-string-where-column-name-contains-special-characters)

from dtale.

aschonfeld avatar aschonfeld commented on May 18, 2024

Fixed this in v.1.7.5. I ended up using this solution which will only work in Python3 and eventually when pandas does a new release it will handle this problem for us. Once that happens I'll make this code be conditional on that version of pandas being used.

from dtale.

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.