REF/INT: preserve block type in joining when only having a single block
State: closed

xref https://github.com/pandas-dev/pandas/issues/17283

Labels:
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=h1) Report
> Merging [#17954](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/e1dabf37645f0fcabeed1d845a0ada7b32415606?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/17954/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17954      +/-   ##
==========================================
- Coverage   91.23%   91.22%   -0.02%     
==========================================
  Files         163      163              
  Lines       50113    50121       +8     
==========================================
- Hits        45723    45722       -1     
- Misses       4390     4399       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.03% <100%> (ø)` | :arrow_up: |
| #single | `40.27% <77.77%> (-0.11%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `94.47% <100%> (+0.01%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.75% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17954?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/17954?src=pr&el=footer). Last update [e1dabf3...2125ac0](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

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

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

```diff
@@            Coverage Diff             @@
##           master   #17954      +/-   ##
==========================================
+ Coverage   91.23%   91.25%   +0.01%     
==========================================
  Files         163      163              
  Lines       50113    50173      +60     
==========================================
+ Hits        45723    45786      +63     
+ Misses       4390     4387       -3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.06% <100%> (+0.03%)` | :arrow_up: |
| #single | `40.29% <77.77%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `94.47% <100%> (+0.01%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.75% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `92.44% <0%> (-0.09%)` | :arrow_down: |
| [pandas/core/panel4d.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWw0ZC5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/io/sql.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2lvL3NxbC5weQ==) | `94.8% <0%> (ø)` | :arrow_up: |
| [pandas/core/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvb3BzLnB5) | `91.77% <0%> (ø)` | :arrow_up: |
| [pandas/core/reshape/concat.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9jb25jYXQucHk=) | `97.58% <0%> (ø)` | :arrow_up: |
| [pandas/core/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY2F0ZWdvcmljYWwucHk=) | `95.75% <0%> (+0.02%)` | :arrow_up: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `97% <0%> (+0.04%)` | :arrow_up: |
| ... and [3 more](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17954?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/17954?src=pr&el=footer). Last update [e1dabf3...3cee1aa](https://codecov.io/gh/pandas-dev/pandas/pull/17954?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback can you have a look at this one? (would like to merge it for 0.21.0, although it is messing with the internals after the rc. But I think you have a better idea on how safe this change is)
Added to the 0.21 milestone, but will leave up to @jreback to decide if it should be pushed.
Opened issue at https://github.com/pandas-dev/pandas/issues/17997
lgtm.
Appveyor finished, but hasn't updated the checkmark yet. Merging.