On sites like stack overflow, providing a minimal example to reproduce a problem makes the live of everyone much easier. This post shows a python function that turns your existing dataframe into a string of python code to ease the burden of providing a minial example.