values that pandas understandswe can use replaceproducing new seriesin [ ]data replace(- np nanout[ ] nan nan - if you want to replace multiple values at onceyou instead pass list then the substitute valuein [ ]data replace([- - ]np nanout[ ] nan nan nan to use different replacement for each valuepass list of substitutesin [ ]data replace([- - ][np nan ]out[ ] nan nan the argument passed can also be dictin [ ]data replace({- np nan- }out[ ] nan nan renaming axis indexes like values in seriesaxis labels can be similarly transformed by function or mapping of some form to produce newdifferently labeled objects the axes can also be modified in place without creating new data structure here' simple examplein [ ]data dataframe(np arange( reshape(( ))index=['ohio''colorado''new york']columns=['one''two''three''four']data transformation www it-ebooks info