How to find number of elements in a dataset?

while solving assignment 2 i am unable to random_split dataset into training and validation because i dont know the number of data elements. What to do Please help

1 Like

You should have answered how many rows are there in the dataset. That’s your total number of data points (elements).

Just in case use len(dataset) or dataset.describe() . (the first returns the number of rows as integer, and the second one returns a summary of the dataframe (count row).

You can also try like this,
len(dataset) * 0.9(90%) for training data and
len(dataset) * 0.1(10%) for validation data.