• 목록
  • 아래로
  • 위로
from tabulate import tabulate

table = tabulate(data)
with open('table_result.txt', 'w', encoding='utf-8') as f:
    f.write(table)

 

위와 같이 인코딩을 'utf-8'로 변경하면 해결되는 경우도 있습니다.

 

저도 그랬고 Stackoverflow를 보니 다른 유저분들도 그런 것 같네요 ^^

 

참조 : https://stackoverflow.com/questions/65661704/python-tabulate-not-writing-to-text-file-correctly

Am trying to tabulate a simple list into a text file formatted using tabulate(), fancy_grid format is...

 

작성자
이니스프리 119 Lv. (0%) 2003770/115200000EXP

Make StudyForUs Great Again!

 

CSVpuymXAAAVVpd.jpg

댓글 0

권한이 없습니다.