我正在尝试在Python 3.4中简单地打开一个.xls文件,但始终收到此错误:
Predicate<String> p1 = s -> s.equals("P");
Predicate<Object> p2 = o -> o.equals("P");
p1.and(p2).test("P"); // which wouldn't be possible with a Predicate<T> as a parameter
这是我的代码:
TypeError: unorderable types: int() <= NoneType()
当我尝试仅运行前三行时,仍然会收到错误消息。
这是错误的完整扩展名:
import pandas as pd
file = r"directory_path"
df = pd.ExcelFile(file)
data = df.parse(1)