Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2023-12-16 17:30:17 +01:00 committed by GitHub
parent a8fad9a222
commit c8f33e1e71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ class pandas.Series(data=None, index=None, dtype=None, name=None, copy=None, fas
>
> Operations between Series (+, -, /, *, **) align values based on their associated index values they need not be the same length. The result index will be the sorted union of the two indexes.
Examples:
Example 1:
```python
import pandas as pd
@ -62,7 +62,7 @@ Output:
2 Sleep
dtype: object
```
Example 2:
```python
import numpy as np
@ -80,7 +80,7 @@ Output:
2 32
dtype: int64
```
Example 3:
```python
import numpy as np
@ -104,6 +104,8 @@ Output:
dtype: float64
```
Example 4:
```python
import pandas as pd
@ -120,3 +122,22 @@ Output:
dtype: object
```
### index and values
```python
import pandas as pd
example = pd.Series(["Bambu", "Tree", "Sleep"])
print(example.index)
print()
print(example.values)
```
Output:
```python
RangeIndex(start=0, stop=3, step=1)
['Bambu' 'Tree' 'Sleep']
```