Home  >  Q&A  >  body text

python - Dataframe里字段过长被截取怎么能显示完整的数据

黄舟黄舟2709 days ago745

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-04-18 10:07:10

    Thanks to kadakyo for the answer, I finally solved the problem using pd.set_option('max_colwidth', 200)

    import pandas as pd
    ……
    df = pd.DataFrame(data, columns=cols)
    ……
    pd.set_option('max_colwidth', 200)
    print(df)

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:07:10

    Try itpd.set_option('display.width', 200)

    reply
    0
  • Cancelreply