Ben Chuanlong Du's Blog

It is never too late to learn.

Reset the Index of a pandas DataFrame

reset_index

By default reset_index returns a copy rather than modify the original data frame. You can specify inplace = True to overwrite the behavior.

Series

  1. If you drop the original index, you still have a Series. However, if you reset index of a sereis without dropping the original index, you get a data frame.

Tips on httpd

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. A directory must be executable by others in order to show up. Even if a directory show up, it does NOT mean that you can access it. It must be readable …