Skip to content

Data

You can use the same data definition formats as in the ipyvizzu library: pandas DataFrame, JSON, or add data manually in different formats. Similarly to ipyvizzu, there are two types of data series: dimensions and measures.

Note

Please note, that all of the data used throughout your data story has to be added to the story at initialization. The data being shown can be filtered at each step.

Tip

See ipyvizzu - Data chapter for more details about data.

Here's some sample code for common use cases.

Using pandas DataFrame

from ipyvizzu import Data
import pandas as pd


data = Data()
df = pd.read_csv(
    "https://ipyvizzu-story.vizzuhq.com/0.11/assets/data/data.csv"
)
data.add_df(df)

Specify data by series

from ipyvizzu import Data


data = Data()
data.add_series("Foo", ["Alice", "Bob", "Ted"])
data.add_series("Bar", [15, 32, 12])
data.add_series("Baz", [5, 3, 2])