Kanaries / pygwalker

PyGWalker: Turn your pandas dataframe into an interactive UI for visual analysis
https://kanaries.net/pygwalker
Apache License 2.0
13.45k stars 704 forks source link

TypeError: encoding without a string argument #33

Closed joseberlines closed 1 year ago

joseberlines commented 1 year ago

I have a double multindex dataframe, i.e. multindex and multindex in the columns names. when passing it to pygwalker I get:

File ~/.local/lib/python3.10/site-packages/pygwalker/utils/fname_encodings.py:4, in fname_encode(fname)
      3 def fname_encode(fname: str):
----> 4     return base64.b64encode(bytes(fname, 'utf-8')).decode()

TypeError: encoding without a string argument

Is this because pygwalker does not admit double multindex?

Asm-Def commented 1 year ago

Hello,

I'm not quite sure if this pr solved your problem, but it does avoid some bugs behaving like this in some cases.

To verify this, please try pip install "pygwalker==0.1.4.2.post0" or pip install "git+https://github.com/Kanaries/pygwalker@33-typeerror"

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