我的问题是由于这些NaN值,我已经尝试过
#df.isnull(0) and df.fillna(0)/df.fillna(0, inplace = true)
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('OLX_Car_Data_CSV.csv',delimiter=',',encoding="ISO-8859-1")
#print(df.shape)
df.fillna(0)
print(df.tail(5))
a = df.Price
b = df.Year
plt.plot(a,b , color = "blue")
plt.show()
答案 0 :(得分:0)
if value == countVowels(item):
score = score + 1
print("Correct!")
else:
print("Incorrect! Correct answer is", countVowels(item))
返回一个新的数据帧,您需要执行以下操作之一:df.fillna(0)
或df.fillna(0, inplace=True)
。