select random row dataframe code example
Example: random rows pandas
# To get 3 random rows
# each time it gives 3 different rows
# df.sample(3) or
df.sample(n = 3)
# To get 3 random rows
# each time it gives 3 different rows
# df.sample(3) or
df.sample(n = 3)