BUG: Fix alignment of list-like objects for operations with DataFrame
State: closed

- [X] closes #17901
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

Some comments:
- Replaced `pd.DataFrame` with `ABCDataFrame` in `isinstance` checks throughout `ops.py`, as I'm of the impression that this is the best practice.  Can revert these if I'm mistaken.
- I didn't use `deque` in the test I modified (though I did in the one I created).  The reason being that `deque` gets cast to `int32` instead of `int64` on Windows, and the test compares against a `Series` with `int64` dtype.  
    - Could be fixed by mimicking the `is_list_like` check here, and doing something similar to #17840 but probably best to do in a separate PR (would be happy to do such a PR)
    - I could explicitly cast the result series to `int64` if we want to add `deque` now, then remove after implementing a fix
    - I suppose it could be marked as xfailing if without modifications if we want to add `deque` now, but seems kind of pointless to mark one of the tests being modified as xfailing

Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations

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

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

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.03% <100%> (ø)` | :arrow_up: |
| #single | `40.31% <70%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17926?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/17926?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvb3BzLnB5) | `91.77% <100%> (+0.01%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17926?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17926?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/17926?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/17926?src=pr&el=footer). Last update [51c5f4d...782eddc](https://codecov.io/gh/pandas-dev/pandas/pull/17926?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks @jschendel nice fix!

> I didn't use deque in the test I modified (though I did in the one I created). The reason being that deque gets cast to int32 instead of int64 on Windows, and the test compares against a Series with int64 dtype.

FYI you can construct using ``np.arange()`` which is platform dependent.