Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding my module using python language #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions submissions/ahmadalmasri95/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Let's import the pandas library first to deal with csv file
import pandas
# Read the csv file using pandas and convert it to DataFrame
df = pandas.read_csv('spotify-2023.csv',encoding_errors='replace')
# Let's do some analysis on the data we've got
total_songs = len(df)
num_songs_in_E_key = len(df[df[key]=='E'])
release_years_counts = df['released_year'].nunique()
max_year_of_releases = df['released_year'].max()
# Displaying our simple analysis
print(f'Total songs are :{total_songs}')
print(f'The number of songs in the key of E is :{num_songs_in_E_key}')
print(f'The number of release years are :{release_years_counts}')
print(f'The most year of released songs is :{max_year_of_releases}')
Loading