1 | initial version |
To change the size of the plot returned by df.hist(), you can pass in the figsize parameter with a tuple of width and height values.
For example:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# create a dataframe with random values
df = pd.DataFrame(np.random.randn(100, 4), columns=['A', 'B', 'C', 'D'])
# plot a histogram with a custom size
df.hist(figsize=(10, 8))
plt.show()
In this example, the figsize parameter is set to (10, 8), which will create a plot with a width of 10 inches and a height of 8 inches. You can adjust these values to your desired size.