BUG: Appending empty list to DataFrame #28769
- [x] closes #28769
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

@simonjayhawkins 
That sounds reasonable. The reason for implementing it to return the same dataframe was based on the suggestion in #28769. I could update the docs to mention that if `other` is an empty list, then it would return the same dataframe. Or maybe explicitly state that passing an empty list would result in an Exception (ValueError?) I'm not sure. see what others think.

not raising on an empty list is perhaps more pythonic, but without checking, I'm not sure how we handle this scenario in other methods.

It maybe worth adding type annotations to `append` and see what mypy has to offer. Hello @asishm! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2019-11-16 20:08:13 UTC can you merge master  Rebased master. I'm not sure if there's an issue with the CI or if I messed something up > Rebased master. I'm not sure if there's an issue with the CI or if I messed something up

I see this in the Travis logs
https://travis-ci.org/pandas-dev/pandas/jobs/612167009#L2418

```
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
The command "ci/setup_env.sh" failed and exited with 2 during .
``` thanks @asishm  > @asishm
> 
> shouldn't passing an empty list raise an Exception. but perhaps with a more user friendly message.

That would be quite special behavior:
```
123 + 0 == 123
x = []; x.extend([]); x == []
"a" + "" == "a"
```
empty lists, strings, etc should be neutral in operations instead of causing errors. That saves an unecessary if check for a corner case.