2021年3月29日星期一

Python Root Path

I'm attempting to set a root path to call for documents contained in multiple subfolders.

This is what I have:

root_path = 'CORD-19-research-challenge'  metadata_path = f'{root_path}/metadata.csv'  meta_df = pd.read_csv(metadata_path, dtype={      'pubmed_id': str,      'Microsoft Academic Paper ID': str,       'doi': str  })  meta_df.head()  

This notebook is contained in the 'CORD-19-research-challenge' folder and the other documents are there as well. Everytime I try to mess with the folder location, name, etc I get an error. Please consult the images as well.

enter image description here

enter image description herer.com/IxIkn.png

https://stackoverflow.com/questions/66863852/python-root-path March 30, 2021 at 10:05AM

没有评论:

发表评论