I cannot figure out why I'm getting a value type error in the first line of my code. I've looked at the other answers to TypeError problems, but cannot see the error.

My Modules

from datetime import datetime  
import matplotlib.pyplot as plt  
import matplotlib.animation as animation   
import matplotlib as mpl   
import matplotlib.font_manager as font_manager  
mpl.rcParams['font.family'] = 'sans-serif'  
mpl.rcParams['font.sans-serif'] = 'Lato'  
import numpy as np  
import pandas as pd

My Dataframe looks like this | | | Count | Non-Null | Dtype | |---|-----------|-------|----------|----------------| | 0 | DATE | 1305 | non-null | datetime64[ns] | | 1 | EFFR | 1305 | non-null | object | | 2 | PRONTSYD | 1306 | non-null | object | | 3 | RRPONTSYD | 1306 | non-null | object | | 4 | RPTSYD | 1306 | non-null | object | | 5 | RRPTSYD | 1306 | non-null | object |

The error occurs on the first line of the code below

stirs = pd.read_csv(r'C:/Users/Owner/Documents/Research/SOMA/FRED_reserves/SOMArates2.csv',\
                   verbose =True , warn_bad_lines = True, \
                   usecols=[0,1,2,3,4,5], parse_dates=['DATE'] )
stirs.info()  
stirs.columns = stirs.columns.str.strip()  
stirs['DATE'] = pd.to_datetime(stirs['DATE'],format='%m/%d/%Y')  
date = stirs.loc[:, "DATE"]  
eff  = stirs.loc[:, "EFFR"]  
repo = stirs.loc[:, "RPONTSYD"]  
rrepo = stirs.loc[:, "RRPONTSYD"]  
mrepo = stirs.loc[:, "RPTSYD"]  
mrrepo = stirs.loc[:, "RRPTSYD"]  
print(eff)  
print(mrrepo)  
x=stirs['DATE']
plt.figure(figsize=(5, 2.7), layout='constrained')
plt.plot(x, eff, label='Effective Fed Funds')  [**]
plt.plot(x, repo, label='Repos')
plt.plot(x, rrepo, label='Reverse repo')  
plt.plot(x, mrepo, label='Repos_OMO')  
plt.plot(x, mrrepo, label='Reverse Repos_OMO')  
plt.xlabel('Date')  
plt.ylabel('y label')  
plt.title("Effective FF rate, repo, reverse repo")  
plt.legend()  
plt.savefig('C:/Users/Owner/Documents/Research/SOMA/Soma_stirs.eps')
Count Non-Null Dtype
0 DATE 1305 non-null datetime64[ns]
1 EFFR 1305 non-null object
2 PRONTSYD 1306 non-null object
3 RRPONTSYD 1306 non-null object
4 RPTSYD 1306 non-null object
5 RRPTSYD 1306 non-null objectplt.show()

I get this error from the code above:

TypeError: 'value' must be an instance of str or bytes, not a float
🔴 No definitive solution yet