Lately I'm constantly finding myself asking questions in Pandas
which depend on data that I'm using , so far it takes me quite a while to create a data frame with similarity to my data (reproducible data frame) so that SO users could easily copy it to their machine.
I would prefer to find a convenient way so i could just print my small DF within my question, and other users could easily collect it, hence creating it with minimum effort.
In R
I'm used to print a small sample of my data within the dput
function in the console, and then printing the output within my question (example):
Getting the error "level sets of factors are different" when running a for loop
I've noticed this explanation, but i don't think its suitable for printing a sample of data for other SO users: Python's equivalent for R's dput() function
Is there an equivalent method in Pandas for doing that?
Thanks in advance!