a patch function to extract patch's name #460
Closed
ahmadtourei
started this conversation in
General
Replies: 3 comments
-
|
This might be a little cleaner: from pathlib import Path
Path(dir_sp.get_contents()['path'][0]).nameOr if you want all of them: contents = dir_sp.get_contents()
name_series = contents['path'].str.split('.', expand=True)[0]What would the API of the function look like? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Yep that's easier. But to avoid file extension, we need to use splitext:
Could it be a utility patch function in dascore.utils.patch with |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
closed by #471 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice to implement a function that can quickly report patch's name (without file extension) in directory spools. I currently use the following code to get patch's name:
@d-chambers what do you think?
Beta Was this translation helpful? Give feedback.
All reactions