Pandas
import numpy as np
import pandas as pd
arr1=np.arange(3,10)
s1=pd.Series(arr1)
print(s1)
import numpy as np
import pandas as pd
dic={'a':10,'b':20,'c':30,'d':40,'e':50}
s1=pd.Series(dic)
print(s1)
import numpy as np
import pandas as pd
arr1=np.arange(3,15).reshape(4,3)
df1=pd.DataFrame(arr1)
print(df1)
import numpy as np
import pandas as pd
dic={'a':[1,2,3,4],'b':[5,6,7,8],'c':[9,12,11,12],'d':[13,14,15,16]}# Created through a dictionary , Labels are stored in columns
df1=pd.DataFrame(dic)
print(df1)
# Created through a dictionary , Labels are stored in columns
Column names and indexes can be changed
0 No. label removal , The first 0 That's ok
Notice the label slice here , It's the end ,,, It's different from before