-
Notifications
You must be signed in to change notification settings - Fork 0
/
pandas.py
61 lines (34 loc) · 961 Bytes
/
pandas.py
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
57
58
59
60
61
#!/usr/bin/env python
# coding: utf-8
# # What is pandas-python? Introduction and Installation
# Pandas is python module that makes data science easy and effective
# Weather dataset
# Questions?
#
# 1. What was the maximum temparature in new york in the month of january?
#
# 2. On which days did it rains?
#
# 3. What was the average speed of wind during the month?
#
# First we will see in python code
# In[27]:
# now we will see in pandas
import pandas as pd
df = pd.read_csv("C://Users/Apolloniann/Desktop/data science/7.1/nyc_weather.csv")
df.tail()
# In[6]:
from google.colab import drive
drive.mount('https://drive.google.com/file/d/1KxwFsL6IF7OD_XN28kjxl0-amnELIhZ8/view?usp=sharing')
# In[ ]:
#get the maximum temparature
df['Temperature'].max()
# In[25]:
#to know which day it rains
df['EST'][df['Events'] == 'Rain']
# In[21]:
#3. average wind speed
df['WindSpeedMPH'].mean()
# # Installation
#
# pip3 install pandas