Skip to content

Commit 0ca20aa

Browse files
authored
Merge pull request #4976 from plotly/update-docs-for-dataframes
Add note on dicts and arrays conversion to Pandas
2 parents 3d36f14 + 357ad0c commit 0ca20aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/python/px-arguments.md

+2
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ fig = px.density_contour(dict(effect_size=5 + np.random.randn(N),
244244
fig.show()
245245
```
246246

247+
To pass a `dict` or an array (such as a NumPy `ndarray`) to the `data_frame` parameter, you'll need to have pandas installed, because `plotly.express` internally converts the `dict` or array to a pandas DataFrame.
248+
247249
#### Integer column names
248250

249251
When the `data_frame` argument is a NumPy array, column names are integer corresponding to the columns of the array. In this case, keyword names are used in axis, legend and hovers. This is also the case for a pandas DataFrame with integer column names. Use the `labels` argument to override these names.

0 commit comments

Comments
 (0)