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

[BUG] "Ask" functionality does not work withing Streamlit #307

Closed aiakubovich closed 1 year ago

aiakubovich commented 1 year ago

Describe the bug "Ask" functionality does not work withing Streamlit

To Reproduce image

Expected behavior Should plot histogram

Versions

Additional context Relevant code:

import pygwalker as pyg
import pandas as pd
import streamlit.components.v1 as components
import streamlit as st

# df = ...

pyg_html = pyg.walk(df, 
                    return_html=True,
                    use_kernel_calc=False, 
                    )

components.html(pyg_html, height=1000, scrolling=True)
ObservedObserver commented 1 year ago
  1. Have you set a kanaries api key? Cloud services (askviz, cloud storage, sharing) requires a kanaries account and api key. You can following the docs here:

  2. Besides, although it might be able to generate a random chart for you, but I still suggested you put a more related question to the data after you enable the key.

aiakubovich commented 1 year ago

Thank you for clarification.

longxiaofei commented 1 year ago

Hi, @aiakubovich, thanks for feedback.

ask-viz is currently an experimental function, and some error tips may not be good enough.

In streamlit, If your streamlit app published in public network, your token will be leaked.

We will be fixing these issues in next version(before this week ends).

Also, you can try the new api of pygwalker in streamlit.

Use new api of pygwalker in streamlit