BUG: DataFrame.append with empty DataFrame and Series with tz-aware datetime value allocated object column
State: closed

broken off #35032

This PR fixes situation where appending a series consecutively to a empty dataframe produces different result from appending the series in one step.

on master
```
>>> import pandas as pd
>>>
>>> pd.__version__
'1.1.0.dev0+1974.g0159cba6e'
>>>
>>> import dateutil
>>>
>>> date = pd.Timestamp("2018-10-24 07:30:00", tz=dateutil.tz.tzutc())
>>> date
Timestamp('2018-10-24 07:30:00+0000', tz='tzutc()')
>>>
>>> s = pd.Series({"date": date, "a": 1.0, "b": 2.0})
>>> s
date    2018-10-24 07:30:00+00:00
a                               1
b                               2
dtype: object
>>>
>>> df = pd.DataFrame(columns=["c", "d"])
>>> df
Empty DataFrame
Columns: [c, d]
Index: []
>>>
>>> result_a = df.append(s, ignore_index=True)
>>> result_a
     c    d    a    b                       date
0  NaN  NaN  1.0  2.0  2018-10-24 07:30:00+00:00
>>>
>>> result_a.dtypes
c        object
d        object
a       float64
b       float64
date     object
dtype: object
>>>
>>> result_b = result_a.append(s, ignore_index=True)
>>> result_b
     c    d    a    b                       date
0  NaN  NaN  1.0  2.0  2018-10-24 07:30:00+00:00
1  NaN  NaN  1.0  2.0  2018-10-24 07:30:00+00:00
>>>
>>> result_b.dtypes
c        object
d        object
a       float64
b       float64
date     object
dtype: object
>>>
>>> result = df.append([s, s], ignore_index=True)
>>> result
     c    d                      date    a    b
0  NaN  NaN 2018-10-24 07:30:00+00:00  1.0  2.0
1  NaN  NaN 2018-10-24 07:30:00+00:00  1.0  2.0
>>>
>>> result.dtypes
c                        object
d                        object
date    datetime64[ns, tzutc()]
a                       float64
b                       float64
dtype: object
>>>
```

Labels:
name: Bug
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Timezones
description: Timezone data dtype

Comments:
Linux py37_np_dev test failures unrelated, xref #35041
I didn't add one since no issue had been raised. I will add a release note and reference this PR?
> I didn't add one since no issue had been raised. I will add a release note and reference this PR?

yep that's good (and generally policy)
release note added
@jreback anything more to do here.

as an aside and not wanting to weigh in on the 2d EA debate; in order to have a Categorical scalar, would we also need a 0d EA? I wondered this before when working on #33846 where IIRC I though at the time the special casing would not have been necessary with 0d EA. Also, while working on #35032, I think it is starting to make sense to not restrict EAs to 1d.
thanks @simonjayhawkins 
> @jreback anything more to do here.
> 
> as an aside and not wanting to weigh in on the 2d EA debate; in order to have a Categorical scalar, would we also need a 0d EA? I wondered this before when working on #33846 where IIRC I though at the time the special casing would not have been necessary with 0d EA. Also, while working on #35032, I think it is starting to make sense to not restrict EAs to 1d.

can-o-worms. well i don't actually think you need a 0-d categorical scalar, a scalar will just do, of course then you cannot infer this to a categorical w/o context but that's ok.