Let us create a pandas dataframe with two columns:
lendf = pd.read_csv('/git/opencv-related/experiments/audio_and_text_files_lens.csv',
names=['path','duration'])
Here is the default numerically incrementing index:
Let's change the index to allow searching by the path attribute:
lendf.set_index(['path'])
But the index did not change??
How about invoking reindex() ?
lendf.reindex()
Still no change!
Note that I had been referencing the source code sphinx https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.set_index.html: here is an excerpt:
So then what am I misunderstanding about pandas indexing - and how should the search/indexing by path be set up?



