How does this work str.replace(r'\(.*\)', '')?

Viewed 250

energy['Country'] = energy['Country'].str.replace(r'(.*)', '')

I know this will remove parenthesis but here what exactly does this (r'(.*)', '') do ..can you pls explain in detail ?

0 Answers
Related