Background
I am trying to get shape of a dataframe. I read the data from from a csv file to a dataframe using pd.read_csv and then am trying ro get its dimensions.
Code
file_name = 'xxxxxx.csv'
with open(file_name, 'r') as f:
metadata_location = [i for i, x in enumerate(f.readlines()) if 'Metadata' in x]
with open(file_name, 'r') as f:
data = pd.read_csv(f, index_col=False, skipfooter=26)
print(data.shape())
Error
TypeError: 'tuple' object is not callable
How to resolve it???????
Other checks
print(type(data))
<class 'pandas.core.frame.DataFrame'>
data = pd.read_csv(file_name, index_col=False, skipfooter=26)
without open – Kaiulani