Published
- 1 min read
pandas remove prefix from columns
The solution for this is noted below
pandas remove prefix from columns
Solution
df.columns = df.columns.str.replace("prefix_", "")
Try other methods by searching on the site. That is if this doesn’t work