-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Description
df = pd.concat([
pd.Series(dtype=float),
pd.Series(index=[pd.Timestamp('2020-01-01T00:00:00+00:00')], data=0, dtype=float)],
axis=1)
>>> df
0 1
2020-01-01 00:00:00+00:00 NaN 0.0df = pd.concat([
pd.Series(index=[pd.Timestamp('2020-01-01T00:00:00')], data=0, dtype=float),
pd.Series(dtype=float)],
axis=1)
>>> df
0 1
2020-01-01 0.0 NaNdf = pd.concat([
pd.Series(index=[pd.Timestamp('2020-01-01T00:00:00+00:00')], data=0, dtype=float),
pd.Series(dtype=float)],
axis=1)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\reshape\concat.py", line 281, in concat
sort=sort,
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\reshape\concat.py", line 452, in __init__
self.new_axes = self._get_new_axes()
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\reshape\concat.py", line 517, in _get_new_axes
for i in range(ndim)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\reshape\concat.py", line 517, in <listcomp>
for i in range(ndim)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\reshape\concat.py", line 523, in _get_comb_axis
self.objs, axis=data_axis, intersect=self.intersect, sort=self.sort
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\indexes\api.py", line 90, in get_objs_combined_axis
return _get_combined_index(obs_idxes, intersect=intersect, sort=sort)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\indexes\api.py", line 138, in _get_combined_index
index = union_indexes(indexes, sort=sort)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\indexes\api.py", line 202, in union_indexes
return result.union_many(indexes[1:])
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\indexes\datetimes.py", line 363, in union_many
this, other = this._maybe_utc_convert(other)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\indexes\datetimelike.py", line 832, in _maybe_utc_convert
raise TypeError("Cannot join tz-naive with tz-aware DatetimeIndex")
TypeError: Cannot join tz-naive with tz-aware DatetimeIndexINSTALLED VERSIONS
commit : None
python : 3.7.4.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.3
numpy : 1.16.4
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.1.3
Cython : 0.29.14
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.3.4
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.3.4
matplotlib : 3.1.1
numexpr : 2.7.0
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.3.0
sqlalchemy : 1.3.16
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : None
numba : 0.45.1