I would like to transform the date level in my multi index but I am not sure how to access that one level without affecting the other level. This is what I am doing:
pipeline_output.index=pipeline_output.index.get_level_values(0).tz_convert('US/Eastern')
This removes the other index obviously so I am left only with date. Is there a way to change this, so that this transformation only applies to level=0?
Another approach I took was this:
pipeline_output.index.get_level_values(0)=pipeline_output.index.get_level_values(0).tz_convert('US/Eastern')
Which produces an error, but it seems to work on the right hand side but not on the left hand side.
EDIT: The approach below has worked (thanks Peter for the suggestion):
pipeline_output.index=pipeline_output.index.set_levels(pipeline_output.index.levels[0].tz_convert('US/Eastern'),level=0)