BUG: dataframe setitem error on size incompatible assignment
- [ ] closes #40827
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them

I've labeled the error something silly but that can be fixed later.

This pull request replaces this older pr #41008 

I've put all my tests inside one file for easier review.

### Issues
I'm unsure how to stop this test from failing `test_pivot_table_doctest_case` Could you help with this?

This test (`test_invalid_colormap`) also fails but when I rerun it individually, it passes ...

I also had an issue with flake8 and black not working together ... in my most recent commit so I just committed it with `--no-verify`.
I may have worked something out so don't review this yet. I've gotten `test_pivot_table_doctest_case` to pass. @jreback Thanks for the review. I will move the tests and rename them later. How do I make sure that I'm not duplicating tests ...? > @jreback Thanks for the review. I will move the tests and rename them later. How do I make sure that I'm not duplicating tests ...?

IIUC, you are essentially narrowing a case, so either try to find the tests that exercise that part of the code (might) be hard, or simply add in the logical place; by-definition you won't be duplicating. @jreback Sorry I've been a bit busy. I'll return to this on the weekend when I have some time. @jreback Hey so I've been trying to work on this but I've been getting an error. Do you have any ideas?
Steps to reproduce:
1. `git fetch upstream`
2. `git merge upstream/master`
3. `conda env update -n pandas-dev --file environment.yml  --prune`
4. `python setup.py build_ext -j 4`

I get this strange error:
```sh

  File "setup.py", line 249
    f"{extension}-source file '{sourcefile}' not found.\n"
                                                         ^
SyntaxError: invalid syntax
```

I'm not really sure why this is happening when it wasn't before. I'm using the new M1 chip on the mac if that matters.

Also, if I get this issue in the future, where should I be putting it? I don't think should be raising a Github issue for development build errors. This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. > This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.

I will have a look and see if I can get this repository running in the next few days. Closing as I do not want to work on this anymore. 