KSp
KSp

Reputation: 1239

Reading datasets on kaggle vs collab gives different shapes

I tried to read the shape of the dataset on kaggle and it shows

df_tr.shape # 35,33,286
(3533286, 9)

and in collab, it shows

df_tr.shape 
(71188, 9)

I am not sure why this much difference. Could someone please let me know? The dataset I am trying to read it in the kaggle.

https://www.kaggle.com/datasets/mkechinov/ecommerce-events-history-in-cosmetics-shop?select=2019-Dec.csv

Upvotes: 0

Views: 35

Answers (1)

KSp
KSp

Reputation: 1239

I was reading the data like this

df_tr = pd.read_csv('2019-Dec.csv')
df_tr.head()

so when I ran the below step

df_tr.shape

it shows fewer records. when I removed df_tr.head() then it shows the proper count as the one in kaggle.

Upvotes: 1

Related Questions