ENH: Use IntergerArray to avoid forced conversion from integer to float
- [ ] closes #xxxx
- [x] tests added / passed
- [ ] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

This is a new attempt to solve issue #16918 after an attempt with PR #27073
Is there a way to make this work without adding a keyword to the DataFrame constructor? That approach seems off to me

Also be sure to add tests with this - its not entirely clear that this does anything as is @WillAyd @jreback If the original implementation of using DataFrame to do the expansion of `list` of `dict` to 2d array and the type determination for columns is to be maintained then it seems to me that there is no way to circumvent propagating a new key in the DataFrame to make it backwards compatible. Is it more desirable to pull out the expansion and type determination logic from DataFrame and have some code duplications?

I will add tests later, but I want to know what is the more accepted methods here first. @jiangyue12392 we are likely going to do the inference for expanding a int dtype with nulls to integer-na (rather than float) at some point, but currently this is NOT the default. We need some more infrastructure first (see the linked issue). @jreback Ok, I will wait till the infrastructure is in place after #27283 is sorted out @jiangyue12392 actually part of this PR could partially satisfy that issue @jreback I suppose the part where the change in `lib.pyx` serves the purpose of distinguishing an `integer_na`. However, on that issue, both @TomAugspurger and @jorisvandenbossche express their concern to keep behaviour consistent with the past where the default datatype is `float64`. I am not sure how users can choose between the new `Int64` behaviour or the old `float64` for backward compatibility so what you do is make the return string integer-na (this is a small api change)
there are a small number of places then that would have to interpret this type (as float) for casting purposes

that’s it @jiangyue12392 can you merge master > @jiangyue12392 can you merge master

Sorry, I have been busy with other stuff recently, will merge as soon as I get my hands free @jiangyue12392 if you can merge master; I think parts of this patch we would want to merge. > @jiangyue12392 if you can merge master; I think parts of this patch we would want to merge.

Master merged. Sorry for the delay. > if you just do the internal change in maybe_convert_objects and add a test for that we can get this in. pls merge master as wel.

I have made the required changes and added the test. > small comment, pls rebase and ping on green.

Green now. thanks @jiangyue12392 nice patch. This should enable us to selectively convert to nullable integers with the user facing routines.