You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpandasaspdimportnumpyasnpfromdatetimeimportdatetimeimportpytzprint"This is working:"data= {23:np.nan, 24:-1949, 25:-1848, 26: np.nan}
date_without_timezone=datetime.now()
df=pd.DataFrame(data, index=[date_without_timezone,])
printdfprintprintdf.indexprintprintdf.stack()
printprintdf.stack().reset_index() #Good (expected) resultprintprint"--------------------"printprint"This is NOT working:"date_with_timezone=datetime.now(pytz.utc)
df_with_timezone=pd.DataFrame(data, index=[date_with_timezone,])
printdf_with_timezoneprintprintdf_with_timezone.indexprintprintdf_with_timezone.stack()
printprintdf_with_timezone.stack().reset_index() # EXCEPTION: ValueError: Length of values does not match length of index
INSTALLED VERSIONS
commit: None
python: 2.7.5.final.0
python-bits: 32
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: PL
INSTALLED VERSIONS
commit: None
python: 2.7.5.final.0
python-bits: 32
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: PL
pandas: 0.14.1
nose: None
Cython: None
numpy: 1.8.1
scipy: None
statsmodels: None
IPython: 2.1.0
sphinx: None
patsy: None
scikits.timeseries: None
dateutil: 2.1
pytz: 2014.2
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.3.1
openpyxl: 2.0.3
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: 0.9.4
pymysql: None
psycopg2: 2.5.3 (dt dec pq3 ext)
The text was updated successfully, but these errors were encountered: