Рассмотрим следующие тестовые данные:
Код: Выделить всё
import polars as pl
import numpy as np
import plotly.express as px
df = pl.DataFrame(
{
"nrs": [1, 2, 3, None, 5],
"names": ["foo", "ham", "spam", "egg", None],
"random": np.random.rand(5),
"groups": ["A", "A", "B", "C", "B"],
}
)
fig = px.bar(df, x='names', y='random')
fig.show()
Код: Выделить всё
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/polars/internals/frame.py:1483: UserWarning: accessing series as Attribute of a DataFrame is deprecated
warnings.warn("accessing series as Attribute of a DataFrame is deprecated")
Подробнее здесь: https://stackoverflow.com/questions/717 ... -to-pandas
Мобильная версия