pygwalker icon indicating copy to clipboard operation
pygwalker copied to clipboard

[BUG] DataFrame column names including a dot (".") are not usable

Open lucasisonline opened this issue 2 years ago • 1 comments

A DataFrame in the format of

x_x y_y
1 3
2 4

will work fine.

The following column naming will result in visible but "unusable" data.

x.x y.y
1 3
2 4

lucasisonline avatar Feb 22 '23 12:02 lucasisonline

Graphic Walker does not parse the column id, which causes a parse error in vega-lite.

This can be fixed by both Graphic Walker and PgGWalker .

TODO:

For independent usage of GW as an app, GW should parse the field id for safety. But for embedding cases, it loses consistency of GW's columns' id and its host columns' id. I will implement this in GW, but leaving a param allows developers to decide whether to use auto column id parser. @Asm-Def

ObservedObserver avatar Feb 22 '23 13:02 ObservedObserver

@lucasisonline Could you have a try with pip install "pygwalker>=0.1.4a2" and give me some feedback?

BTW: Welcome to join our discord discord invitation link to keep track of the latest progress

Asm-Def avatar Feb 22 '23 20:02 Asm-Def

Hi @Asm-Def ,

thank you for the fast fix!

I tested it on a >7k dataset with >150 features including column names of the type very-much-autogenerated-including-special-characters.

Works like a charm! Nice and easy way to quickly explore the dataset. ♥

(To be very explicit in the characters used [a-zA-Z()._ ])

lucasisonline avatar Feb 22 '23 21:02 lucasisonline