Skip to content

Commit b4394b1

Browse files
committed
add transforms note
1 parent f51ff00 commit b4394b1

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

doc/python/v6-changes.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ pip install anywidget
5858

5959
Plotly.py now takes advantage of recent changes in how Plotly.js handles typed arrays for improved performance. See the [performance page](python/performance/) for more details.
6060

61-
6261
## Removed Attributes
6362

6463
The following attributes have been removed in Plotly.py 6.
@@ -133,4 +132,21 @@ The `pointcloud` trace has been removed. Use [`scattergl`](/python/reference/sca
133132

134133
### Transforms
135134

136-
Transforms, which were deprecated in Plotly.py v5, have been removed.
135+
Transforms, which were deprecated in Plotly.py v5, have been removed. You can achieve similar functionality by preprocessing the data with a DataFrame library.
136+
137+
For example, a transform to filter the data:
138+
139+
```python
140+
dict(
141+
type = 'filter',
142+
target = df['year'],
143+
orientation = '=',
144+
value = 2007
145+
),
146+
```
147+
148+
Could be rewritten using Pandas:
149+
150+
```python
151+
df_2007 = df[df['year'] == 2007]
152+
```

0 commit comments

Comments
 (0)