filmov
tv
Python Bytes - Panda Dataframe Groupby Filter #coding #python #datascience Code in Description

Показать описание
#Coded by Andrew
#Youtube does not allow angled brackets in video titles or descriptions so I replaced it with actual text. You will need to replace it back to original code in the video to execute.
import pandas as pd
import numpy as np
ipl_data = {'Team': ['Riders', 'Riders', 'Devils', 'Devils', 'Kings',
'Kings', 'Kings', 'Kings', 'Riders', 'Royals', 'Royals', 'Kings'],
'Rank': [1, 2, 2, 7, 3,4 ,1 ,1,2 , 4,1,2],
'Year': [2014,2015,2014,2015,2014,2015,2016,2017,2016,2014,2015,2017],
'Points':[876,789,863,673,741,812,756,999,694,701,804,690]}
df = pd.DataFrame(ipl_data)
print('Example 1')
print('Example 2')
#Youtube does not allow angled brackets in video titles or descriptions so I replaced it with actual text. You will need to replace it back to original code in the video to execute.
import pandas as pd
import numpy as np
ipl_data = {'Team': ['Riders', 'Riders', 'Devils', 'Devils', 'Kings',
'Kings', 'Kings', 'Kings', 'Riders', 'Royals', 'Royals', 'Kings'],
'Rank': [1, 2, 2, 7, 3,4 ,1 ,1,2 , 4,1,2],
'Year': [2014,2015,2014,2015,2014,2015,2016,2017,2016,2014,2015,2017],
'Points':[876,789,863,673,741,812,756,999,694,701,804,690]}
df = pd.DataFrame(ipl_data)
print('Example 1')
print('Example 2')