ENH: DataFrame or Series to code
**Request**

Have a method to transform a pandas object to code. 

**Example**

The given situation

`given_df = pd.DataFrame({"a": [1, 2],
                                 "b": pd.to_datetime(["2019-01-01", "2019-12-31"]),
                                 "c": ["a", "b"]})`

Call to the method : 

`code_string = given_df.to_code()`

Expected output : 
`pd.DataFrame({'a': [1, 2], 'b': pd.to_datetime(['2019-01-01', '2019-12-31'], format='%Y-%m-%d'), 'c': ['a', 'b']})`


**Is your feature request related to a problem?**

The usage I would have of such a method would be when I'm writing integration tests. 

GIven `my_function`, I want to write a integration test to make sure that result doesn't changes. 
The output of my function is a DataFrame which is a bit long a few lines, and a few columns. 


    class test(unitest.testcase): 
        def test_integration(self):
             # Given
             given_some_args
             
             # When
             result_df: pd.DataFrame = my_function(given_some_args)
             
             # Then
             pd.testing.assert_frame_equals(expected_df, result_df)


Writing the `expected_df` manually is time consuming. I would like to be able to get it by executed `result_df.to_code() `once and then copy past the generated code in my integration test.

**API breaking implications**

I don't think it will have impact on existing API. 

**Describe alternatives you've considered**

A proposition of implementation would be `"df = pd.DataFrame( %s )" % (str(df.to_dict()))`

Although it is a simple implementation, 

- it doesn't work for every types of series (for example datetimes), 
- it doesn't provide executable code in case of `nan`, 
- it doesn't include needed imports

**Additional context**

This need has already been raised in[ this question](https://stackoverflow.com/questions/41769882/pandas-dataframe-to-code) on stackoverflow.