본문 바로가기
다양한 TIP

python3 pandas 설치(판다스 라이브러리, 데이터정리)

by 유기농프로그래밍 2022. 3. 21.
반응형

pandas라는 라이브러리는 개발에 많이 사용한다.

이 라이브러리를 설치하는 방법은 아래와 같다.

apt-get install python3-pandas

develop:~/# apt-get install python3-pandas
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  blt fonts-lyx javascript-common libaec0 libblas3 libblosc1 libgfortran4 libhdf5-100 libjs-jquery libjs-jquery-ui liblapack3 libsz2 libtcl8.6 libtk8.6 libwebpdemux2 python-matplotlib-data python-tables-data python3-bs4 python3-cycler
  python3-decorator python3-html5lib python3-lxml python3-matplotlib python3-numexpr python3-numpy python3-olefile python3-pandas-lib python3-pil python3-pyparsing python3-scipy python3-tables python3-tables-lib python3-tk python3-tz
  python3-webencodings tk8.6-blt2.5 ttf-bitstream-vera
Suggested packages:
  blt-demo libjs-jquery-ui-docs tcl8.6 tk8.6 python-cycler-doc python3-genshi python3-lxml-dbg python-lxml-doc dvipng ffmpeg gir1.2-gtk-3.0 ghostscript inkscape ipython3 python-matplotlib-doc python3-cairocffi python3-gi-cairo
  python3-gobject python3-nose python3-pyqt4 python3-sip python3-tornado texlive-extra-utils texlive-latex-extra ttf-staypuft gfortran python-numpy-doc python3-numpy-dbg python-pandas-doc python-pil-doc python3-pil-dbg
  python-pyparsing-doc python-scipy-doc python-tables-doc python3-netcdf4 vitables tix python3-tk-dbg
The following NEW packages will be installed:
  blt fonts-lyx javascript-common libaec0 libblas3 libblosc1 libgfortran4 libhdf5-100 libjs-jquery libjs-jquery-ui liblapack3 libsz2 libtcl8.6 libtk8.6 libwebpdemux2 python-matplotlib-data python-tables-data python3-bs4 python3-cycler
  python3-decorator python3-html5lib python3-lxml python3-matplotlib python3-numexpr python3-numpy python3-olefile python3-pandas python3-pandas-lib python3-pil python3-pyparsing python3-scipy python3-tables python3-tables-lib
  python3-tk python3-tz python3-webencodings tk8.6-blt2.5 ttf-bitstream-vera
0 upgraded, 38 newly installed, 0 to remove and 24 not upgraded.
Need to get 34.9 MB of archives.
After this operation, 157 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

(설치되는 목록이 무쟈게 많다)


사용방법

import pandas as pd

위와 같이 라이브러리를 추가하고

df=pd.DataFrame(데이터)

이렇게 작업하면 기본적으로 데이터를 정리될 수 있다.

반응형

댓글