pandas and numpy liberary
input:
import numpy as np
import pandas as pd
s=pd.Series([0.430217,0.617328,-0.265421,-0.836113])
print(s)
print('\n')
print(s*100)
print('\n')
print(s>0)
print('\n')
print(s[1:1])
print('\n')
print(s[0:1])
print('\n')
print(s[0:2])
print('\n')
s[0:1]=12
print(s)
print('\n')
print(s.index)
print(s.values)
Output:
Output:
0 0.430217
1 0.617328
2 -0.265421
3 -0.836113
dtype: float64
0 43.0217
1 61.7328
2 -26.5421
3 -83.6113
dtype: float64
0 True
1 True
2 False
3 False
dtype: bool
Series([], dtype: float64)
0 0.430217
dtype: float64
0 0.430217
1 0.617328
dtype: float64
0 12.000000
1 0.617328
2 -0.265421
3 -0.836113
dtype: float64
RangeIndex(start=0, stop=4, step=1)
[12. 0.617328 -0.265421 -0.836113]