Description
Description
Importing pandas makes plotting with matplotlib and standard datetime objects impossible.
A type error is raised in matplotlib because pandas import datetime and "override the global" one.
I would not expect pandas to override the default datetime. After importing pandas one cannot use datetimes for plotting for example.
PS: just reposting this from matplotlib issue 6796
Code Sample, a copy-pastable example if possible
import datetime
import matplotlib.pyplot as plt
# this works
x = [datetime.date(1677,1,1) + datetime.timedelta(days=i) for i in range(10)]
plt.plot(x,range(10))
import pandas as pd
# do not work anymore
x = [datetime.date(1677,1,1) + datetime.timedelta(days=i) for i in range(10)]
plt.plot(x,range(10))
Expected Output
datetime would not be "change".
output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Darwin
OS-release: 15.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_AU.utf-8
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 21.0.0
Cython: 0.24
numpy: 1.11.0
scipy: 0.17.0
statsmodels: 0.6.1
xarray: 0.7.2
IPython: 4.2.0
sphinx: 1.3.5
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: 2.3.3
xlrd: 0.9.4
xlwt: None
xlsxwriter: None
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.40.0
pandas_datareader: None