I am new to SE DS so please let me know if I need to edit my question.
data = pd.read_csv('Desktop/dataset.csv')
# Feature 1
feature_1 = data['expenses']
I have a series representing a feature column from my dataset:
feature_1.head()
0 6384.911133
1 5099.380859
2 5501.954590
3 7101.831055
4 5235.987793
Name: expenses, Length: 420, dtype: float64
When I call feature_1.shape it returns (420, )
I have a figure and axes area set up and plot:
# Create a figure area with three plots
fig, axes = plt.subplots(1, 3, figsize=(15,4.5))
axes[0, 0].hist(feature_1, bins=5)
It then returns the error IndexError: too many indices for array
I am a little confused of what the probelm might be here becuase I have the same set up for another notebook that works. Any thoughts?