raela
Databricks Employee
Databricks Employee

What's the purpose of creating those smaller dataframes? Are you trying to write them out to separate files?

You could just use a filter command and filter by gender, and then generate random samples for each resulting dataframe if you need to.