Pretty-print an entire Pandas Series / DataFrame

后端 未结 12 2404
再見小時候
再見小時候 2020-11-22 03:26

I work with Series and DataFrames on the terminal a lot. The default __repr__ for a Series returns a reduced sample, with some head and tail values, but the res

12条回答
  •  无人共我
    2020-11-22 03:56

    datascroller was created in part to solve this problem. It loads the dataframe into a terminal view you can "scroll" with your mouse or arrow keys, kind of like an Excel workbook at the terminal that supports querying, highlighting, etc.

    import pandas as pd
    from datascroller import scroll
    
    # Call `scroll` with a Pandas DataFrame as the sole argument:
    my_df = pd.read_csv('')
    scroll(my_df)
    

提交回复
热议问题