writing detected maxima to pandas dataframe