I'm currently trying to create a data framework consisting of daily US Treasury rates. As you can see, pandas automatically formats the columns so that they are in order, which I clearly don't want. Here are some of my code. I needed to make a small example to show the problem that I am facing.
import quandl
import matplotlib.pyplot as plt
One_Month = quandl.get('FRED/DGS1MO')
^^ Repeatable for all bets
Yield_Curve = pd.DataFrame({'1m': One_Month['Value'], '3m': Three_Month['Value'], '1yr': One_Year['Value']})
Yield_Curve.loc['2017-06-22'].plot()
plt.show()

Yield_Curve.tail()
1m 1yr 3m
Date
2017-06-16 0.85 1.21 1.03
2017-06-19 0.85 1.22 1.02
2017-06-20 0.88 1.22 1.01
2017-06-21 0.85 1.22 0.99
2017-06-22 0.80 1.22 0.96
As I said, I only added three bids to the data framework, but obviously two-year, three-year and five-year bids will also cause a problem.
I searched and saw this post:
Building a Treasury yield curve, how to overlay two yield curves using matplotlib
, (One_Month, Three_Month....), , .
: ?
!