So far, we have learned the three pandas data structure and how to create them. Due to its importance in real-time data processing, we will focus on dataframe objects right now and mention a few other data structures.
Let’s consolidate the above structures with examples.
Example 1
import pandas as pd
import numpy as np
s = pd.Series(np.random.randn(4))
print(s)
0 1.373370
1 -0.960120
2 0.143523
3 0.553266
dtype: float64
**Example 2 (axes)**
Returns the list of row axis tags.
import pandas as pd
import numpy as np
s = pd.Series(np.random.randn(4))
print(s.axes)
[RangeIndex(start=0, stop=4, step=1)]
```
#python-pandas #data-science-training #artificial-intelligence #python #programming #pandas