Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Cannot infer dst time from Timestamp('2015-11-01 01:00:10'), try using the 'ambiguous' argument #11619
Comments
|
can you show a sample of the frame, as well as |
This was referenced Nov 17, 2015
Closed
jreback
added Bug Timezones
labels
Nov 17, 2015
jreback
added this to the
0.17.1
milestone
Nov 17, 2015
jreback
added a commit
to jreback/pandas
that referenced
this issue
Nov 17, 2015
|
|
jreback |
0e9ce37
|
jreback
removed this from the
0.17.1
milestone
Nov 17, 2015
jreback
removed the
Bug
label
Nov 17, 2015
jreback
added a commit
that referenced
this issue
Nov 17, 2015
|
|
jreback |
91407ff
|
jreback
added a commit
to jreback/pandas
that referenced
this issue
Nov 18, 2015
|
|
jreback |
7d9186b
|
jreback
referenced
this issue
Nov 18, 2015
Merged
TST: tests for outputing ambiguous times, #11619, fixed already in #11301 #11641
jreback
added this to the
0.17.1
milestone
Nov 18, 2015
jreback
added Output-Formatting CSV
labels
Nov 18, 2015
jreback
closed this
in #11641
Nov 18, 2015
jreback
added a commit
that referenced
this issue
Nov 18, 2015
|
|
jreback |
d6ceeba
|
adamschultz
referenced
this issue
Oct 12, 2016
Closed
AmbiguousTimeError: Cannot infer dst time from Timestamp('2015-11-01 01:00:03'), try using the 'ambiguous' argument #14402
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vgoklani commentedNov 16, 2015
running pandas 0.17, and getting this error when generating a csv, traceback is below. What exactly does "try using the ambigous argument mean"?
df.to_csv("VIP_data.csv", encoding="utf-8", index=False)
AmbiguousTimeError Traceback (most recent call last)
in ()
----> 1 df.to_csv("VIP_data.csv", encoding="utf-8", index=False)
/opt/anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in to_csv(self, path_or_buf, sep, na_rep, float_format, columns, header, index, index_label, mode, encoding, quoting, quotechar, line_terminator, chunksize, tupleize_cols, date_format, doublequote, escapechar, decimal, **kwds)
1287 escapechar=escapechar,
1288 decimal=decimal)
-> 1289 formatter.save()
1290
1291 if path_or_buf is None:
/opt/anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in save(self)
1492
1493 else:
-> 1494 self._save()
1495
1496 finally:
/opt/anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _save(self)
1592 break
1593
-> 1594 self._save_chunk(start_i, end_i)
1595
1596 def _save_chunk(self, start_i, end_i):
/opt/anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _save_chunk(self, start_i, end_i)
1607 decimal=self.decimal,
1608 date_format=self.date_format,
-> 1609 quoting=self.quoting)
1610
1611 for col_loc, col in zip(b.mgr_locs, d):
/opt/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in to_native_types(self, slicer, na_rep, date_format, quoting, **kwargs)
1999
2000 from pandas.core.format import _get_format_datetime64_from_values
-> 2001 format = _get_format_datetime64_from_values(values, date_format)
2002
2003 result = tslib.format_array_from_datetime(values.view('i8').ravel(),
/opt/anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _get_format_datetime64_from_values(values, date_format)
2189 def _get_format_datetime64_from_values(values, date_format):
2190 """ given values and a date_format, return a string format """
-> 2191 is_dates_only = _is_dates_only(values)
2192 if is_dates_only:
2193 return date_format or "%Y-%m-%d"
/opt/anaconda/lib/python2.7/site-packages/pandas/core/format.pyc in _is_dates_only(values)
2143 def _is_dates_only(values):
2144 # return a boolean if we are only dates (and don't have a timezone)
-> 2145 values = DatetimeIndex(values)
2146 if values.tz is not None:
2147 return False
/opt/anaconda/lib/python2.7/site-packages/pandas/util/decorators.pyc in wrapper(_args, *_kwargs)
87 else:
88 kwargs[new_arg_name] = new_arg_value
---> 89 return func(_args, *_kwargs)
90 return wrapper
91 return _deprecate_kwarg
/opt/anaconda/lib/python2.7/site-packages/pandas/tseries/index.pyc in new(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, closed, ambiguous, dtype, **kwargs)
342 ints = subarr.view('i8')
343 subarr = tslib.tz_localize_to_utc(ints, tz,
--> 344 ambiguous=ambiguous)
345
346 subarr = subarr.view(_NS_DTYPE)
pandas/tslib.pyx in pandas.tslib.tz_localize_to_utc (pandas/tslib.c:64516)()
AmbiguousTimeError: Cannot infer dst time from Timestamp('2015-11-01 01:00:10'), try using the 'ambiguous' argument