Data type of new assigned DataFrame column #23326
- [ ] closes #23326
- [ ] tests added / pass
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Hello @charlesdong1991! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/indexing.py`](https://github.com/charlesdong1991/pandas/blob/a9c4a14ac8ba1c2d905681adfe2f87990299cf4b/pandas/core/indexing.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexing/test_loc.py`](https://github.com/charlesdong1991/pandas/blob/a9c4a14ac8ba1c2d905681adfe2f87990299cf4b/pandas/tests/indexing/test_loc.py) !

 @charlesdong1991 : Thanks for the PR!  It looks like there is no associated issue for this PR, and it's a little tricky to understand what you're fixing here.

Do you mind providing sample code that illustrates the problem you're seeing? @gfyoung  sorry, i was trying to debug the issue listed in #23326 which brings up a wrong type when assigning a int type value, and getting float value as output...  probably i cause more errors when dealing with it. sorry for this...
`df = pd.DataFrame([list('abc')])`
`df.loc[:, 'col1'] = int(5)`
and then the value in column is 5.0 instead of 5...
happy to know if you think it's necessary, and any suggestion of which file might cause this issue is welcome...  @charlesdong1991 : Ah, no worries.  Thanks for linking the existing the issue! sorry, wasn't able to find the issue and had some holidays... will leave it to other people.