Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#Serial Processing with pandas
import pandas as pd
import time
#This loads the dataset
df = pd.read_csv("Trips_Full_Data.csv")
#Measures the time for aggregation in pandas
start_time = time.time()
result_pandas = df.groupby('Trip Type')['Distance'].sum()
end_time = time.time()
pandas_time = end_time - start_time
print(f"Time taken for serial processing with pandas: {pandas_time:.2f} seconds")