Skip to content

Commit d68efd7

Browse files
Name change. Operation now makes more sense
1 parent 9f6eee8 commit d68efd7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/source/ecosystem.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,10 @@ Let’s take this piece of code as an example in file round.py
620620
621621
import pandas as pd
622622
623-
decimals = pd.DataFrame({'TSLA': 3, 'AMZN': 2})
623+
decimals = pd.DataFrame({'TSLA': 2, 'AMZN': 1})
624624
prices = pd.DataFrame(data={'date': ['2021-08-13', '2021-08-07', '2021-08-21'],
625625
'TSLA': [720.13, 716.22, 731.22], 'AMZN': [3316.50, 3200.50, 3100.23]})
626-
sorted_prices = prices.round(decimals=decimals)
626+
rounded_prices = prices.round(decimals=decimals)
627627
628628
629629
mypy won't see any issues with that but after installing pandas-stubs and running it again
@@ -646,4 +646,4 @@ we can fix the code
646646

647647
.. code:: python
648648
649-
decimals = pd.Series({'TSLA': 3, 'AMZN': 2})
649+
decimals = pd.Series({'TSLA': 2, 'AMZN': 1})

web/pandas/community/ecosystem.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,10 @@ Let’s take this piece of code as an example in file round.py
426426
```
427427
import pandas as pd
428428
429-
decimals = pd.DataFrame({'TSLA': 3, 'AMZN': 2})
429+
decimals = pd.DataFrame({'TSLA': 2, 'AMZN': 1})
430430
prices = pd.DataFrame(data={'date': ['2021-08-13', '2021-08-07', '2021-08-21'],
431431
'TSLA': [720.13, 716.22, 731.22], 'AMZN': [3316.50, 3200.50, 3100.23]})
432-
sorted_prices = prices.round(decimals=decimals)
432+
rounded_prices = prices.round(decimals=decimals)
433433
```
434434

435435
mypy won't see any issues with that but after installing pandas-stubs and running it again
@@ -448,5 +448,5 @@ And after confirming with the [docs](https://pandas.pydata.org/docs/reference/ap
448448
we can fix the code
449449

450450
```
451-
decimals = pd.Series({'TSLA': 3, 'AMZN': 2})
451+
decimals = pd.Series({'TSLA': 2, 'AMZN': 1})
452452
```

0 commit comments

Comments
 (0)