I would like to do something in Python that I think is pretty simple but I have had a difficult time doing.
I am trying to create three variables by taking the three separate sections of the file_name variable, as separated by the '_' symbol. The first variable should be the first 10 digits, the second variable should be the next 6 digits, and the third variable should be the remaining digits. The last section could be 1, 2, 3, or 4 digits long. I appreciate any help!
Here is an example of what my dataframe currently consists of:
| file_path | File_name |
|---|---|
| /Users/user/Dropbox/SEC investigat... | _0000886982_18795_2687.txt |
| /Users/user/Dropbox/SEC investigat... | _0000072333_16855_805.txt |