{"version":"1.0","type":"rich","title":"Gist d55d478bb85bfb424d4ea80f2af06d2a","description":"This example demonstrates a utility function that renames the columns of a pandas DataFrame. It shows how to apply a custom naming scheme, such as joining multi-level column labels with an underscore, or replacing the column names with an explicit list. The function `setcols` accepts a DataFrame and an optional function or list; when no list is provided, it maps the given function across the existing column index. The code relies on pandas’ `columns` attribute and the `map` method, making it a concise tool for data preprocessing before visualization.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-d55d478bb85bfb424d4ea80f2af06d2a?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}