Jul-12-2022, 09:57 PM
I am trying to see the columns in a dataframe. I am using the following Python 3 code:
Can I convert df to a dataframe?
Respectfully,
LZ
scaler=StandardScaler() df=scaler.fit_transform(df) df.head()and I get the following error:
Error:AttributeError Traceback (most recent call last) Input In [11], in <cell line: 3>() 1 scaler=StandardScaler() 2 df=scaler.fit_transform(df) ----> 3 df.head() AttributeError: 'numpy.ndarray' object has no attribute 'head'I still want to see the columns in df. I did not know it was a numpy.array. How do I fix this?Can I convert df to a dataframe?
Respectfully,
LZ