--People who are having trouble getting "Type Error: No matching signature found" when using python's df.fillna (method = "ffill")
python
df.fillna(method="ffill")
If the error "Type Error: No matching signature found" occurs in, you can correct it as follows.
python
df.astype("object").fillna(method="ffill")
Convert to object format once and then apply fillna. The above error seems to occur when the type is different. Don't forget to astype again as int or float after fillna. To make it float, follow below.
python
df.astype("object").fillna(method="ffill").astype("float")
Recommended Posts