medha
medha

Reputation: 11

TypeError: 'tuple' object is not callable encountered while performing some data preprocessing

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

Answers (1)

Jodh Singh
Jodh Singh

Reputation: 383

shape is just an attribute, not a method. Use x.shape instead of x.shape().

Upvotes: 4

Related Questions