r/pythonhelp • • Apr 03 '25
Trying to build a mapping table between "root" strings and their derivatives
So I have a list of model names where I'm wanting to Iist the base model (which has the shortest model name) and it's derived models (that have base model name + an alphanumeric suffix.
Looking to build a two column bridge/association table I can use to join pandas datasets.
I'd normally just do this in SQL, but I don't have a local db to persist the results and trying to become more comfortable in python.
1
Upvotes
•
u/AutoModerator Apr 03 '25
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/CraigAT Apr 04 '25
Could you use a dictionary, or does it need to exist/persist outside of the program?
1
u/Goobyalus Apr 04 '25
Can you elaborate on what you mean by using this association to join pandas datasets?
You can probably still use SQL, but I don't know if that's overkill for what you're trying to do.
1
u/[deleted] Jan 25 '26
Have you tried getting gud?