-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpandasv1.py
More file actions
56 lines (45 loc) · 763 Bytes
/
pandasv1.py
File metadata and controls
56 lines (45 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import pandas
import pandas as pd
pd
<module 'pandas' from 'C:\\Users\\mouni\\Downloads\\pythoninstall\\lib\\site-packages\\pandas\\__init__.py'>
l2=[10,20,30,40]
pd.Series(l2)
0 10
1 20
2 30
3 40
dtype: int64
pd.Series(l2,index=["i","ii","iii","iiii"])
i 10
ii 20
iii 30
iiii 40
dtype: int64
pd.DataFrame(l2)
0
0 10
1 20
2 30
3 40
l=[10,20,30]
s=pd.Series(l)
print(s)
0 10
1 20
2 30
s=pd.Series(a)
print(s)
0 1
1 2
2 4
3 5
dtype: int32
# list---[1,2,3]
# tuple ---(1,2,3)
#pandas dataframe
#below is list of tuples
d=[("85","ECE"),("98","BCE")]
pd.DataFrame(d)
0 1
0 85 ECE
1 98 BCE