-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilepanda.py
More file actions
50 lines (33 loc) · 912 Bytes
/
Copy pathfilepanda.py
File metadata and controls
50 lines (33 loc) · 912 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
import pandas as pd
df = pd.read_csv('data.csv')
#print(df.to_string())
#print(df.head(10))
#print(df.head())
#print(df.tail())
#a = df.dropna()
#print(a.to_string())
#df.dropna(inplace = True)
#print(df.to_string())
#df = pd.read_csv('data.csv')
#df.fillna(130, inplace = True)
#print(df.to_string())
#df = pd.read_csv('data.csv')
#df["Calories"].fillna(130, inplace = True)
#print(df.to_string())
#x = df["Calories"].mean()
#df["Calories"].fillna(x, inplace = True)
#print(df.to_string())
#x = df["Calories"].median()
#df["Calories"].fillna(x, inplace = True)
#print(df.to_string())
#x = df["Calories"].mode()[0]
#df["Calories"].fillna(x, inplace = True)
#print(df.to_string())
#df["Date"]=pd.to_datetime(df['Date'])
#print(df.to_string())
#df.loc[20,"Duration"]= 35
#print(df.to_string())
for x in df.index:
if df.loc[x,"Pulse"]>100:
df.loc[x,"Pulse"]=777
print(df.to_string())