From f0666f8bb8ab27cc7c188d80f7e07cfdc79388ee Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 7 Jul 2023 10:43:06 -0400 Subject: [PATCH 1/7] Update wide-form.md --- doc/python/wide-form.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/python/wide-form.md b/doc/python/wide-form.md index b1a35c01064..572e7a02dc8 100644 --- a/doc/python/wide-form.md +++ b/doc/python/wide-form.md @@ -5,10 +5,10 @@ jupyter: text_representation: extension: .md format_name: markdown - format_version: '1.2' - jupytext_version: 1.4.2 + format_version: '1.3' + jupytext_version: 1.14.7 kernelspec: - display_name: Python 3 + display_name: Python 3 (ipykernel) language: python name: python3 language_info: @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.7.7 + version: 3.10.4 plotly: description: Plotly Express' 2D-Cartesian functions accept data in long-, wide-, and mixed-form. @@ -36,7 +36,9 @@ jupyter: ### Plotly Express works with Column-oriented, Matrix or Geographic Data -Plotly Express provides functions to visualize a variety of types of data. Most functions such as `px.bar` or `px.scatter` expect to operate on column-oriented data of the type you might store in a Pandas `DataFrame` (in either "long" or "wide" format, see below). [`px.imshow` operates on matrix-like data](/python/imshow/) you might store in a `numpy` or `xarray` array and functions like [`px.choropleth` and `px.choropleth_mapbox` can operate on geographic data](/python/maps/) of the kind you might store in a GeoPandas `GeoDataFrame`. This page details how to provide a specific form of column-oriented data to 2D-Cartesian Plotly Express functions, but you can also check out our [detailed column-input-format documentation](/python/px-arguments/). +Plotly Express provides functions to visualize a variety of types of data. Most functions such as `px.bar` or `px.scatter` expect to operate on column-oriented data of the type you might store in a `DataFrame` (in either "long" or "wide" format, see below). These functions use Pandas internally to process the data, but you can also use them with other types of DataFrames that have a `to_pandas` method or support the [Python dataframe interchange protocol](https://data-apis.org/dataframe-protocol/latest/index.html), for example, a [Polars](https://www.pola.rs/) DataFrame. + +[`px.imshow` operates on matrix-like data](/python/imshow/) you might store in a `numpy` or `xarray` array and functions like [`px.choropleth` and `px.choropleth_mapbox` can operate on geographic data](/python/maps/) of the kind you might store in a GeoPandas `GeoDataFrame`. This page details how to provide a specific form of column-oriented data to 2D-Cartesian Plotly Express functions, but you can also check out our [detailed column-input-format documentation](/python/px-arguments/). ### Plotly Express works with Long-, Wide-, and Mixed-Form Data @@ -312,4 +314,4 @@ fig.show() fig = px.box(wide_df, orientation="h") fig.show() -``` \ No newline at end of file +``` From bf18732bcf4b31a4de8625a367f7f041d24ebc58 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 7 Jul 2023 10:46:00 -0400 Subject: [PATCH 2/7] Update plotly-express.md --- doc/python/plotly-express.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/python/plotly-express.md b/doc/python/plotly-express.md index 4a3327c848d..4e4c30e8f31 100644 --- a/doc/python/plotly-express.md +++ b/doc/python/plotly-express.md @@ -5,10 +5,10 @@ jupyter: text_representation: extension: .md format_name: markdown - format_version: '1.2' - jupytext_version: 1.4.2 + format_version: '1.3' + jupytext_version: 1.14.7 kernelspec: - display_name: Python 3 + display_name: Python 3 (ipykernel) language: python name: python3 language_info: @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.7.7 + version: 3.10.4 plotly: description: Plotly Express is a terse, consistent, high-level API for creating figures. @@ -42,8 +42,7 @@ Plotly Express provides [more than 30 functions for creating different types of Here is a talk from the [SciPy 2021 conference](https://www.scipy2021.scipy.org/) that gives a good introduction to Plotly Express and [Dash](https://dash.plotly.com/): -```python hide_code=true -%%html +```html hide_code=true