Python next(df.dropna().tail(1).iterrows()) 为啥不报错
inp = [{'c1':10, 'c2':100}, {'c1':11, 'c2':110}, {'c1':12, 'c2':123}]df = pd.DataFrame(inp)print(df,"
")test_row = next(df.dropna().tail(1).iterrows())print(test_row,"
")输出:c1 c20 10 1001 11 1102 12 123(2, c1 12c2 123Name: 2,
")test_row = next(df.dropna().tail(1).iterrows())print(test_row,"
")输出:c1 c20 10 1001 11 1102 12 123(2, c1 12c2 123Name: 2,