Permalink
Cannot retrieve contributors at this time
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?
VinceDayrit-initial_RESIT_project-/histogram.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
14 lines (12 sloc)
355 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Load the dataset | |
df = pd.read_csv('Trips_by_Distance.csv') | |
# Plot histogram | |
plt.figure(figsize=(10, 6)) | |
plt.hist(df['Week'], bins=20, color='blue', alpha=0.7) | |
plt.xlabel('Week') | |
plt.ylabel('Frequency') | |
plt.title('Histogram of People Staying at Home vs Week') | |
plt.grid(True) | |
plt.show() |