但报错如下:
Traceback (most recent call last):
File "d:\OneDrive\code\python\yonghoujiping\play.py", line 19, in <module>
df = pd.concat([df, pd.DataFrame(df_temp)], ignore_index=False)
File "C:\Users\candyissupersweet\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\util\_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
File "C:\Users\candyissupersweet\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\concat.py", line 359, in concat
return op.get_result()
File "C:\Users\candyissupersweet\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\reshape\concat.py", line 588, in get_result
indexers[ax] = obj_labels.get_indexer(new_labels)
File "C:\Users\candyissupersweet\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\indexes\base.py", line 3721, in get_indexer
raise InvalidIndexError(self._requires_unique_msg)
pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects