-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmissing.py
More file actions
45 lines (41 loc) · 848 Bytes
/
missing.py
File metadata and controls
45 lines (41 loc) · 848 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 20 11:17:22 2021
@author: deepak
"""
import pandas as pd
sdata={'ohio': 35000, 'texas': 71000, 'oregon': 16000, 'utah': 5000}
print(sdata)
obj3=pd.Series(sdata)
print(obj3)
print()
states=['california', 'ohio', 'oregon', 'texas']
obj4=pd.Series(sdata, index=states)
print(obj4)
print()
print('isnull: ')
print(pd.isnull(obj4))
print()
print(obj4.isnull())
print()
print(obj4.isnull().sum())
print()
print(pd.notnull(obj4))
print()
print(obj4.notnull())
print('Critical series features:-')
print()
print(obj3)
print()
print(obj4)
print()
o9=(obj3+obj4)
print(o9)
print('----------------------------------------------------------')
obj4.name='Population'
obj4.index.name='state'
print(obj4)
obj=pd.Series([4, 7, -5, 3])
obj.index=['bob', 'steve', 'jeff', 'rayan']
print(obj)