使用 pandasdate_range
函数时出现错误。我已经给出了下面的跟踪,并且可以提供更多上下文,但这似乎是我真的必须深入自己才能解决的问题。
所以我想知道的是,是否有办法获取跟踪中提到的文件的源代码,特别datetime.pyx
是在定义 Timestamp 类的地方——我似乎找不到它。我对 Python 非常熟悉,不太了解包和源代码,但我希望如果我能更深入地挖掘,我将能够对此有所了解。
>>> d=process_files(args, options, False)
Processing file K2.csv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/py7041Jtp.py", line 158, in process_files
File "/tmp/py7041Jtp.py", line 81, in process_csv
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/tseries/index.py", line 1317, in date_range
freq=freq, tz=tz, normalize=normalize, name=name)
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/tseries/index.py", line 176, in __new__
tz=tz, normalize=normalize)
File "/usr/local/lib/python2.7/dist-packages/pandas-0.8.1-py2.7-linux-x86_64.egg/pandas/tseries/index.py", line 254, in _generate
start = Timestamp(start)
File "datetime.pyx", line 87, in pandas.lib.Timestamp.__new__ (pandas/src/tseries.c:26892)
File "datetime.pyx", line 511, in pandas.lib.convert_to_tsobject (pandas/src/tseries.c:32019)
File "datetime.pyx", line 640, in pandas.lib._string_to_dts (pandas/src/tseries.c:33452)