# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + pycharm={"is_executing": false}
import numpy as np
import pandas as pd

# + pycharm={"is_executing": false}
data = pd.read_csv("../data/csv/achmusik.csv")

# + pycharm={"is_executing": false}
# Getting the decimals right -- commas to points and no more Nones
data = data.set_index(["genre", "sub_genre", "artist", "album", "song"])
data.fillna(value="", inplace=True)

for i in range(data.columns.size):
    data[data.columns[i]] = pd.to_numeric(data[data.columns[i]], errors='coerce')


# + pycharm={"is_executing": false}
data.corr(method="spearman")

# + pycharm={"is_executing": false}
# data_sample = data.groupby("artist").size()

data.groupby("artist").mean().idxmax()

# + jupyter={"outputs_hidden": false} pycharm={"is_executing": false, "name": "#%%\n"}
data.groupby("artist").agg("count").idxmax()

# + jupyter={"outputs_hidden": false} pycharm={"name": "#%%\n"}



StarcoderdataJupyterScriptsDedupFiltered