Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # import libraries
- import matplotlib.pyplot as plt
- import pandas as pd
- import seaborn as sns
- from sklearn.model_selection import train_test_split
- # Load the data
- FILE_PATH = './games.csv'
- games = pd.read_csv(FILE_PATH)
- # Print the names of the columns & shapes in games
- print(games.columns)
- print(games.shape)
- # Make a histogram of all the ratings in the average_rating column
- plt.hist(games["average_rating"])
- plt.show()
- # Print the first row of all the games with zero scores
- print(games[games['average_rating'] == 0].iloc[0])
- # Print the first row of games with scores grater than 0
- print(games[games['average_rating'] > 0].iloc[0])
Add Comment
Please, Sign In to add comment