I am going through the bar plot section in dataquest. I came across a statement bar_heights = norm_reviews[num_cols].iloc.values . How is this different from bar_heights = norm_reviews[num_cols].iloc ? Is there any special purpose for the .Values?
Thank you in advance.
You can read the documentation on
.values using the
import numpy as np
import pandas as pd
The purpose of
.values is to convert the
np.ndarray or ndarray-like.
@alvinctk Thank you…it is helpful
I was trying to understand this also. What I don’t get is why this step is needed. Does the axes.bar() method specifically require a
np.ndarray rather than a