BUG: do not cast ints to floats if inputs of crosstab are not aligned
 - [x] closes #17005
 - [x] tests added / passed
 - [x] passes ``git diff master -u -- "*.py" | flake8 --diff``
 - [x] whatsnew entry

... plus some trivial refactoring.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=h1) Report
> Merging [#17011](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/aead041fece0ef17a81218585329109e17b5deb9?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17011/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17011      +/-   ##
==========================================
- Coverage      91%   90.98%   -0.02%     
==========================================
  Files         161      161              
  Lines       49305    49311       +6     
==========================================
- Hits        44868    44865       -3     
- Misses       4437     4446       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.75% <100%> (ø)` | :arrow_up: |
| #single | `40.19% <8.33%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/reshape/pivot.py](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9waXZvdC5weQ==) | `95.18% <100%> (+0.1%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.76% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=footer). Last update [aead041...a5085d2](https://codecov.io/gh/pandas-dev/pandas/pull/17011?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 Hello @toobaz! Thanks for updating the PR.





Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on July 19, 2017 at 09:29 Hours UTC @jreback I made a note that when I will fix #17013 I'll come back and remove the two lines ``if`` above thanks.

