Reputation: 11
I am encountering an error while checking the shape of variable x
#imports
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import load_diabetes
#loading the dataset
dbt=load_diabetes()
#exploring the dataset
dbt.keys()
#Creating a dataframe that contains all the data
df_feat=pd.DataFrame(dbt['data'],columns=dbt['feature_names'])
#data preprocessing
x=df_feat
y=dbt['target']
x.shape()
y.shape()
Upvotes: 0
Views: 4556
Reputation: 383
shape
is just an attribute, not a method.
Use x.shape
instead of x.shape()
.
Upvotes: 4