1 min read

EDA-profilingTool

1. pandas-profiling

  • pandas profiling은 수많은 양의 데이터에 대한 EDA를 하나의 보고서 형태로 만들어주는 패키지이다

설치 방법

  • pip사용
pip install pandas-profiling[notebook]
  • github에서 최신 버전 다운로드
pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip
  • conda
conda install -c conda-forge pandas-profiling

코드

import pandas_profiling
pandas_profiling.ProfileReport(data)
  • 결과물을 html로 저장하는 방법
profile = ProfileReport(data)
profile.to_file("output.html")

결과물

  • 변수별 특징, 결측값, 변수별 상관관계 등에 대한 정보를 하나의 보고서 형태로 출력해준다 png png png

png

2. error 해결법

설치를 다 완료하였음에도 오류가 발생하는 경우가 있다.

  1. TypeError: concat() got an unexpected keyword argument ’join_axes"

pandas 1.0이상의 버전에서 join_axes의 코드가 삭제되었기 때문에 발생하는 문제이다

우선 본인의 pandas 버전을 확인해본다

pandas.showversion()

pandas의 버전이 1.0이상인 경우, pandas 0.25.0의 버전으로 다시 설치한다

$ pip install pandas==0.25.0
  1. c++ visual studio 설치 visual studio

위 홈페이지에서 ’c++를 사용한 데스크톱 개발’을 설치하고 pip을 이용해 pandas profile을 설치한다