import pandas as pd
import numpy as np
df=pd.read_excel('team.xlsx')
df.head().style.highlight_max()
运行后提示:
TypeError:'>=' not supported between instances of 'str' and 'float'.如何解决呢
import pandas as pd
import numpy as np
df=pd.read_excel('team.xlsx')
df.head().style.highlight_max()
运行后提示:
TypeError:'>=' not supported between instances of 'str' and 'float'.如何解决呢
可以先去翻译一下哈,这句话的大概意思是在'str'和'float'实例之间不支持'>='。也就是说,你的df里面有str类型,所以无法运行最后一句