text_plain_output_1.png
from sklearn import preprocessing

import matplotlib.pyplot as plt

import numpy as np

import numpy as np # linear algebra

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df = pd.read_csv('../input/movies_metadata.csv')

df_numeric = df[['budget', 'popularity', 'revenue', 'runtime', 'vote_average', 'vote_count', 'title']]

df_numeric.isnull().sum()

df_numeric = df_numeric.dropna()

df_numeric = df_numeric[df_numeric['vote_count'] > 30]

df_numeric.shape

from sklearn import preprocessing
minmax_processed = preprocessing.MinMaxScaler().fit_transform(df_numeric.drop('title', axis=1))
df_numeric_scaled = pd.DataFrame(minmax_processed, index=df_numeric.index, columns=df_numeric.columns[:-1])

plt.figure(figsize=(12,7))
axis = sns.barplot(x=np.arange(0,5,1),y=df_numeric.groupby(['cluster']).count()['budget'].values)
x=axis.set_xlabel("Cluster Number")
x=axis.set_ylabel("Number of movies")

size_array = list(df_numeric.groupby(['cluster']).count()['budget'].values)
size_array

df_numeric[df_numeric['cluster'] == 2].head(5)