Add source example files
This commit is contained in:
11
source/pandas/01-pandas-manual/01-series-demo.py
Normal file
11
source/pandas/01-pandas-manual/01-series-demo.py
Normal file
@ -0,0 +1,11 @@
|
||||
"""Define simple Series objects by hand."""
|
||||
import pandas as pd
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Creating a series with coherent value type
|
||||
s1 = pd.Series([1, 3, 7, 9, 13, 15, 19, 21])
|
||||
|
||||
# Get the length of the series
|
||||
print(f"Size of the series: {len(s1)}")
|
||||
# Display the contents of s1
|
||||
print(s1)
|
Reference in New Issue
Block a user