Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个大约 3000 行的数据框。我想在所有行中搜索一个特定的字符串“Town Location”,然后获取它第一次出现的行的索引,以便我可以解析该记录下的所有数据。我试过 idx = df1.index.get_loc('Town Location').idmax() 但它根本不起作用。