BUG #11638 return correct dtype for int and float
closes #11638
 Please review. 

tests!
use the example from the issue 
 Added test case .
Squashed commits.
Please review.
 @varun-kr looks good. can you add a release not to whatsnew/0.17.0 in bug fixes.
 It should be 0.17.1.  Right ?
 yep
 ping when green.
 Done.
 merged via https://github.com/pydata/pandas/commit/24cdf45423237bbcf290bc249e93814bfca71c8e

I expanded the tests a bit, thanks for the push!
