BUG: Series.to_dict does not return native Python types
State: closed

- [x] xref #25969
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

This resolves the issue of return types from `to_dict`. #25969 also discusses return types from `.items()`, which relates to an outstanding NumPy issue numpy/numpy#14139, and I don't address that part here atm

Labels:
name: IO Data
description: IO issues that don't fit into a more specific label
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
cc @jreback this is the follow-on to #37571
and pls merge master
Addressed comment + CI green modulo unrelated (a plotting test on each failing build)
Marking as draft as this no longer works after rebase (and looking)
Green, ready for re-review
@jreback this one is ready to go
@jreback fixed the whatsnew (deleted datetime return types entry and reopened original issue). CI green barring unrelated Database run
lgtm. @jbrockmendel if any comments
comment on type/dtype checking, otherwise LGTM
@jreback there's a deprecation warning which turns into an error with np_dev

```
====================================================================== warnings summary ======================================================================
pandas/tests/io/json/test_json_table_schema.py::TestTableOrientReader::test_comprehensive
pandas/tests/io/json/test_json_table_schema.py::TestTableOrientReader::test_comprehensive
pandas/tests/io/json/test_json_table_schema.py::TestTableOrientReader::test_comprehensive
pandas/tests/io/json/test_json_table_schema.py::TestTableOrientReader::test_comprehensive
  /Users/andrewwieteska/repos/pandas/pandas/io/json/_json.py:177: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
    return dumps(
```

I'm positive it's caused by this PR - I don't get the warning locally on master but I do on this PR. I also think it's not a straightforward problem to debug and would prefer to address in a follow-on PR. Is that ok?

Skipping the test for now with numpy dev and will open an issue to track
this handled by #39854

don't skip the test just leave
actually u already skipped so ok
should get to green now

@jreback ready to go i believe
thanks @arw2019 
@arw2019 Question about this, was this also supposed to fix/return `datetime` instead of Panda's `Timestamp`? I'm still getting Pandas `Timestamp` objects out of `to_dict()` it seems.
Wondering if this is a bug or if this was intended.

```
>>> import pandas as pd
>>> import numpy as np

>>> pd.__version__
'1.5.3'

>>> date_rng = pd.date_range(start='1/1/2020', end='1/10/2020', freq='D')
>>> data = {'date': date_rng, 'data1': np.random.randint(0,100,size=(len(date_rng))), 'data2': np.random.randint(0,100,size=(len(date_rng)))}
>>> df = pd.DataFrame(data)
>>> df.to_dict(orient='records')
[{'date': Timestamp('2020-01-01 00:00:00'), 'data1': 15, 'data2': 29}, {'date': Timestamp('2020-01-02 00:00:00'), 'data1': 69, 'data2': 79}, {'date': Timestamp('2020-01-03 00:00:00'), 'data1': 5, 'data2': 35}, {'date': Timestamp('2020-01-04 00:00:00'), 'data1': 77, 'data2': 7}, {'date': Timestamp('2020-01-05 00:00:00'), 'data1': 65, 'data2': 8}, {'date': Timestamp('2020-01-06 00:00:00'), 'data1': 98, 'data2': 79}, {'date': Timestamp('2020-01-07 00:00:00'), 'data1': 84, 'data2': 49}, {'date': Timestamp('2020-01-08 00:00:00'), 'data1': 71, 'data2': 58}, {'date': Timestamp('2020-01-09 00:00:00'), 'data1': 85, 'data2': 10}, {'date': Timestamp('2020-01-10 00:00:00'), 'data1': 73, 'data2': 10}]
```
Timestamp can represent points in time that pydatetime cannot.  im pretty sure this is intended.