<jupyter_start><jupyter_text>Cara install lib kaggle*   Ambil data dari kaggle yang dibutuhkan API*   Unduh lib kaggle *   Import file kaggle.json*   Buat direktori dan ubah permission direktori<jupyter_code>pip install kaggle
from google.colab import files
files.upload()
!mkdir ~/.kaggle
!cp kaggle.json ~/.kaggle/
!chmod 600 ~/.kaggle/kaggle.json<jupyter_output><empty_output><jupyter_text>Download Data dan unzip datanya<jupyter_code>!kaggle datasets list
!kaggle datasets download shreyanshkhandelwal/goal-dataset-top-5-european-leagues
!unzip goal-dataset-top-5-european-leagues.zip -d goal-dataset-top-5-european-leagues<jupyter_output>Archive:  goal-dataset-top-5-european-leagues.zip
  inflating: goal-dataset-top-5-european-leagues/Bundesliga-goalScorer(20-21).csv  
  inflating: goal-dataset-top-5-european-leagues/LaLiga-goalScorer(20-21).csv  
  inflating: goal-dataset-top-5-european-leagues/Ligue_1-goalScorer(20-21).csv  
  inflating: goal-dataset-top-5-european-leagues/Serie_A-goalScorer(20-21).csv  
  inflating: goal-dataset-top-5-european-leagues/epl-goalScorer(20-21).csv<jupyter_text>Data<jupyter_code>import pandas as pd
import numpy as np
path = "goal-dataset-top-5-european-leagues/epl-goalScorer(20-21).csv"
df = pd.read_csv(path)
df
df.head()
df.tail()
df_tanpaid = df.iloc[:, 2:]
df_tanpaid
df_rapi = df_tanpaid.sort_values(by="player_name", ascending = True)
df_rapi.head(15)
df_rapi1 = df_tanpaid.sort_values(by="assists", ascending = False)
df_rapi1.head(15)
df_rapi.describe(include = 'all')
df_rapi[['goals', 'assists', 'games', 'shots']].mean()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13424487259167184, 'fraction_numerical': 0.027967681789931635, 'mean_word_length': 5.880341880341881, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '538830', 'license': 'MIT', 'n_tokens_mistral': 693, 'n_tokens_neox': 656, 'n_words': 97, 'path': 'Pertemuan 5 (Data Gathering and Understanding)/latihan_mds.ipynb', 'repo_name': 'DiendaRHR/Metodologi-Data-Science', 'size': '1609'}