pandas: Setting xticks with time series broken in 0.21
Hey. So this worked in 0.20 but not in 0.21:
import matplotlib.pyplot as plt
xticks = pd.date_range(start="10/10/2017", end="11/11/2017",
freq='D')
plt.xticks(xticks, xticks.strftime("%a %m-%d"))
TypeError: Cannot compare type ‘Timestamp’ with type ‘float’
I’m not sure that was on purpose. So far every ~minor~ major release of pandas since my book came out broke the code in my book 😕 It would be nice to get deprecation warnings.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 15 (9 by maintainers)
Commits related to this issue
- FIX: Temporary fix for matplotlib issues with pandas 0.21 See this pandas issue https://github.com/pandas-dev/pandas/issues/18283 — committed to cchwala/pycomlink by cchwala 7 years ago
I opened https://github.com/pandas-dev/pandas/issues/18301 to make sure we look at this for 0.21.1