파이썬(Python)/Pandas

python에서 pandas dataframe에서 컬럼의 text가 모두 안보이는 경우

leebaro 2021. 3. 12.
728x90

컬럼 값이 길경우 ....으로 줄여서 나오는 경우가 있다.

이 때는 아래와 같은 옵션을 데이터 조회 전에 실행하면 된다.

두 번째 파라미터의 -1은 노출할 텍스트 수의 제한이 없음을 의미한다.

pd.set_option('display.max_colwidth', -1)

 

 

 


참고

stackoverflow.com/questions/25351968/how-to-display-full-non-truncated-dataframe-information-in-html-when-convertin

 

How to display full (non-truncated) dataframe information in html when converting from pandas dataframe to html?

I converted a pandas dataframe to an html output using the DataFrame.to_html function. When I save this to a separate html file, the file shows truncated output. For example, in my TEXT column, df.

stackoverflow.com

 

728x90