BUG: Fix wrong SparseBlock initialization
State: closed

- [x] closes #17198
- [x] tests added / passed
    
    Passed the same tests which the current master branch pass.
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Bug
name: Sparse
description: Sparse Data Type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=h1) Report
> Merging [#17386](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/64c8a8d6fecacb796da8265ace870a4fcab98092?src=pr&el=desc) will **decrease** coverage by `0.04%`.
> The diff coverage is `71.42%`.

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

```diff
@@            Coverage Diff             @@
##           master   #17386      +/-   ##
==========================================
- Coverage   91.03%   90.99%   -0.05%     
==========================================
  Files         163      163              
  Lines       49580    49586       +6     
==========================================
- Hits        45137    45119      -18     
- Misses       4443     4467      +24
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.77% <71.42%> (-0.03%)` | :arrow_down: |
| #single | `40.25% <42.85%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.7% <100%> (ø)` | :arrow_up: |
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `94.2% <66.66%> (-0.1%)` | :arrow_down: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.23% <0%> (-1.82%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.72% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17386?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/17386?src=pr&el=footer). Last update [64c8a8d...7928aaa](https://codecov.io/gh/pandas-dev/pandas/pull/17386?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/17386?src=pr&el=h1) Report
> Merging [#17386](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/96a527434a6138b291c1b4a782bd2793cff51f74?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `91.78%`.

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

```diff
@@            Coverage Diff             @@
##           master   #17386      +/-   ##
==========================================
- Coverage   91.43%    91.4%   -0.03%     
==========================================
  Files         163      163              
  Lines       50091    50148      +57     
==========================================
+ Hits        45800    45838      +38     
- Misses       4291     4310      +19
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.21% <91.78%> (-0.01%)` | :arrow_down: |
| #single | `40.34% <27.39%> (-0.08%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.82% <100%> (+0.04%)` | :arrow_up: |
| [pandas/core/sparse/array.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2FycmF5LnB5) | `92.05% <100%> (-0.24%)` | :arrow_down: |
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `94.32% <90.9%> (-0.22%)` | :arrow_down: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17386?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |

------

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

needs tests
@jreback Thanks for your comment. I've just added test codes.
@jreback Thanks for your review! I've found the initial solution is not enough through fixing tests.
Also I've modified the solution!
@jreback Okay. I'll split the commit.
@jreback The big commit is now split. If you have any questions, feel free to ask.
Rebased to change commit logs
@Licht-T I believe you have all of the xfail tests in. pls rebase and update.
@jreback Yeah! Nothing stands in my way!
Now rebased.
@Licht-T can you see if you can simplify this, there seem to be lots of if/then cases. I think you might be able to define / override some sparse methods in internals to avoid this.
@Licht-T can you update?

closing as stale, though we'd definitely take a fixed up / rebased version updated for comments