For each concept of my dataset I have stored the corresponding wikipedia categories. For example, consider the following 5 concepts and their corresponding wikipedia categories.
"Therefore, I would like to know if there is a way to obtain the
parent category
of the categories (for example, the categories ofenzyme inhibitor
andbypass surgery
belong tomedical
parent category)"
MediaWiki categories are themselves wiki pages. A "parent category" is just a category which the "child" category page belongs to. So you can get the parent categories of a category in exactly the same way as you'd obtain the categories of any other wiki page.
For example, using pymediawiki:
p = wikipedia.page('Category:Enzyme inhibitors')
parents = p.categories