Is there a Python library equivalent to STATA’s splitsample command?
For context:
STATA has a command called ‘splitsample’ where it effectively splits your current dataset into different partitions based on some user defined value. nsplit() defines how many groups, gen() creates the group identifiers for each.