Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import numpy as np
- import seaborn as sns
- from matplotlib import pyplot as plt
- df = pd.read_csv('./vgsales.csv', encoding='latin-1')
- var = df['Publisher'].value_counts().loc[lambda x: x > 831]
- for index, row in df.iterrows():
- for tmp in var.index:
- if tmp == row["Publisher"]:
- df.at[index, "Publisher"] = "прочее"
- print(df['Publisher'].value_counts())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement