Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

EXAMPLE https://www.dropbox.com/s/t2r02ftjarqldzx/amazon_analysis.ipynb?dl=0 PYT

ID: 3713200 • Letter: E

Question

EXAMPLE https://www.dropbox.com/s/t2r02ftjarqldzx/amazon_analysis.ipynb?dl=0

PYTHON CSV

What is the stop_name where the most people got on?

Which direction has the highest passenger traffic? (Passenger traffic is determined by the sum of the number of people getting on at any stop along a route in a given direction)

What is the route_name of the most popular route? (The most popular route is the one with the highest average passenger traffic in either direction.) Which date has the highest passenger traffic?

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pymysql

pd.read_csv(’apcdata_week.csv’)

csv file

index date route_id 00 OUT A WNP 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 7/1/16 route_name direction stop_id stop_name ons offs 55 55: Clevelanc Southbound 139050 JONESBORO 55 55: Clevelanc Southbound 102148 MITCHELL ST 55 55: Clevelanc Southbound 102150 CAPITOL SQ: 55 55: Clevelanc Southbound 115172 HANK AARON DR/VANIRA AVE SE 55 55: Cleveland Southbound 125060 MCDONOUGH BLVD SE/MARCY ST SE 55 55: Clevelanc Southbound 139008 JONESBORO RD SE/JORDA 55 55: Clevelanc Southbound 139010 BROWNS MILL RD SE/LAQUITA DR SE 55 55: Clevelanc Southbound 102262 MITCHELL ST SW/CENTRAL AVE SW 55 55: Clevelanc Southbound 115204 HANK AARON DR SW/LITT 1 55 55: Clevelanc Southbound 102270 BROAD ST/A 55 55: Clevelan Southbound 159254 HUTCHENS RD SE/DONNEBROOK LN SE 55 55: Cleveland Southbound 159272 JONESBORO RD SE/SPRINGSIDE DR SE 55 55: Clevelanc Southbound 159274 JONESBORO RD SE/SPRINGSIDE DR 55 55: Clevelanc Southbound 159276 JONESBORO RD SE/2961 55 55: Clevelanc Southbound 115192 HANK AARON DR/RALPH E 55 55: Clevelanc Southbound 125028 WEYMAN AVE SW/RIDGE 55 55: Clevelanc Southbound 125072 JONESBORO RD SE/MOURY AVE SE vehicle_id 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 2409 27 11 1 15 16 17

Explanation / Answer

Since you have not provided the entire data im giving you the code that you need to run in order to get the resutl

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

import pymysql

data = pd.read_data('apcdata_week.csv')

# Finding Stop_name where maximum people got on

ans_stop_name = data.loc[data['ons'] == max(data['ons'])]['stop_name']

print ans_stop_name

# Finding direction with the highest number of traffic

temp = data.groupby('direction').sum()

ans_direction = temp.loc[temp['ons']==max(temp['ons'])]

print sel

#Finding most popular route_name

temp = data.groupby('route_name').mean()

ans_route_name = temp.loc[temp['ons'] == max(temp['ons'])]

print ans_route_name

# Finding date with the highest passenger traffic

temp = data.groupby('date').sum()

ans_date = temp.loc[temp['ons'] == max(temp['ons'])]

print ans_date

Since you have not provided the entire data im giving you the code that you need to run in order to get the resutl

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pymysql

data = pd.read_data('apcdata_week.csv')


# Finding Stop_name where maximum people got on
ans_stop_name = data.loc[data['ons'] == max(data['ons'])]['stop_name']
print ans_stop_name

# Finding direction with the highest number of traffic
temp = data.groupby('direction').sum()
ans_direction = temp.loc[temp['ons']==max(temp['ons'])]
print sel

#Finding most popular route_name
temp = data.groupby('route_name').mean()
ans_route_name = temp.loc[temp['ons'] == max(temp['ons'])]
print ans_route_name

# Finding date with the highest passenger traffic
temp = data.groupby('date').sum()
ans_date = temp.loc[temp['ons'] == max(temp['ons'])]
print ans_date

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote