API: Always return DataFrame from get_dummies
State: closed

xref https://github.com/pandas-dev/pandas/issues/19239

In preparation for hopefully deprecating SparseDataFrame / SparseSeries. Right now, I've just made this an API breaking change.

If we want to do this via deprecation, we'd need a new keyword argument to control the result type. I opted against that, because to get a warning-free `get_dummies` people would need

```python
pd.get_dummies(..., sparse=True, result_type=None/'sparse_dataframe'/'dataframe'):
    ...
```

IMO, that's too big a burden for the common case, but would be curious to hear others' thoughts here.

Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: API Design
name: Sparse
description: Sparse Data Type

Comments:
Hello @TomAugspurger! Thanks for submitting the PR.

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

 - There are no PEP8 issues in the file [`pandas/tests/reshape/test_reshape.py`](https://github.com/TomAugspurger/pandas/blob/bfb3dfb038b75370160cf51b7cab13bdc4adcbd1/pandas/tests/reshape/test_reshape.py) !


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

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

```diff
@@            Coverage Diff             @@
##           master   #24284      +/-   ##
==========================================
- Coverage   92.22%   92.22%   -0.01%     
==========================================
  Files         162      162              
  Lines       51828    51821       -7     
==========================================
- Hits        47799    47791       -8     
- Misses       4029     4030       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <100%> (-0.01%)` | :arrow_down: |
| #single | `43% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24284?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/24284/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.55% <100%> (-0.01%)` | :arrow_down: |
| [pandas/io/json/json.py](https://codecov.io/gh/pandas-dev/pandas/pull/24284/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vanNvbi5weQ==) | `92.61% <0%> (-0.48%)` | :arrow_down: |
| [pandas/core/arrays/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24284/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3BlcmlvZC5weQ==) | `98.48% <0%> (-0.02%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24284/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.51% <0%> (+0.09%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24284?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/24284?src=pr&el=footer). Last update [d564c42...f4fa09e](https://codecov.io/gh/pandas-dev/pandas/pull/24284?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/24284?src=pr&el=h1) Report
> Merging [#24284](https://codecov.io/gh/pandas-dev/pandas/pull/24284?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/e3b6683a707c195ccc26a161587ab1b60706d0c4?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24284      +/-   ##
==========================================
- Coverage   92.28%   92.28%   -0.01%     
==========================================
  Files         162      162              
  Lines       51830    51827       -3     
==========================================
- Hits        47831    47827       -4     
- Misses       3999     4000       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.68% <100%> (-0.01%)` | :arrow_down: |
| #single | `43.01% <0%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24284?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/24284/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.55% <100%> (-0.01%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24284/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.48% <0%> (-0.1%)` | :arrow_down: |

------

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

does that specific issues that it closes?
No specific issue.
thanks !