Christina Savvides
Christina Savvides

Reputation: 31

Plot histogram of all values in dataFrame

Is there a way to plot all the values of a dataframe without seperating them into different colors by column? I want to see the distribution of all values in the dataframe regardless of column. However dataframe.plot.hist() overlays all the column histograms onto of each other.

Upvotes: 2

Views: 4071

Answers (1)

Viach
Viach

Reputation: 508

df = pd.DataFrame(np.random.randint(5, size=(3, 4)), columns=['col_' + str(i) for i in range(4)])
df

dataframe

df.stack().plot.hist()

hist

Upvotes: 4

Related Questions