Skip to content

missing imports in tseries/tools/dateutil_parse #2658 #2661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
2 commits merged into from Jan 10, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pandas/tseries/tests/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,14 @@ def _simple_ts(start, end, freq='D'):
class TestDatetimeIndex(unittest.TestCase):
_multiprocess_can_split_ = True

def test_stringified_slice_with_tz(self):
#GH2658
import datetime
start=datetime.datetime.now()
idx=DatetimeIndex(start=start,freq="1d",periods=10)
df=DataFrame(range(10),index=idx)
df["2013-01-14 23:44:34.437768-05:00":] # no exception here

def test_append_join_nondatetimeindex(self):
rng = date_range('1/1/2000', periods=10)
idx = Index(['a', 'b', 'c', 'd'])
Expand Down
3 changes: 3 additions & 0 deletions pandas/tseries/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def dateutil_parse(timestr, default,
ignoretz=False, tzinfos=None,
**kwargs):
""" lifted from dateutil to get resolution"""
from dateutil import tz
import time

res = DEFAULTPARSER._parse(StringIO(timestr), **kwargs)

if res is None:
Expand Down