Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function that uses os.path.join to create new paths #32

Open
JohannesWiesner opened this issue Jun 4, 2024 · 1 comment
Open

Add function that uses os.path.join to create new paths #32

JohannesWiesner opened this issue Jun 4, 2024 · 1 comment

Comments

@JohannesWiesner
Copy link
Owner

Would be nice to have a function that is similar to get_new_filepath but automatically uses os.path.join behind the scenes? Or maybe obsolete because we can also use get_new_filepath?

@JohannesWiesner
Copy link
Owner Author

Example:

Create a new column subject_dir by joining a fixed variable root_dir with each subject's subject id and session name:

df_sourcedata['subject_dir'] = df_sourcedata.apply(lambda row: os.path.join(root_dir,row['subject_id'],row['session']),axis=1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant