본문 바로가기

다시시작하는/PYTHON4

Python 코딩 가이드라인 프로젝트에 참여했다면 프로젝트에서 정의된 코딩 가이드라인을 따름 코딩 가이드라인이 없는경우 PEP 8 참고. 단, 똑같이 따라할 필요는 없을듯. 일관된 코딩스타일을 구축하는게 중요함. PEP 8 is the de facto code style guide for Python. A high quality, easy-to-read version of PEP 8 is also available at pep8.org. >import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than co.. 2020. 2. 6.
pandas 설치 가장 쉬운 방법은 Anaconda 설치하는 것. (http://docs.continuum.io/anaconda/) 두번째 방법은 Miniconda 설치하는 것, 용량을 줄일 수 있지만 필요한 패키지는 그때 그때 설치해야 함.(http://conda.pydata.org/miniconda.html) Python 버전은 공식적으로 3.6.1, 3.7, 3.8 지원, 2.7은 그냥 보내주자. conda create -n name_of_my_env python source activate name_of_my_env activate name_of_my_env conda install pandas or conda install pandas=0.20.3 다른 패키지를 설치하고 싶다면 conda install ipyth.. 2020. 1. 30.
데이터 분석을 위한 panda-profiling 데이터 분석을 위해서는 통계적 지식과 프로그래밍 기술이 필요하다. 하지만 통계적 지식이 적고 프로그래밍 스킬이 낮다면 다른 사람이 만들어놓은 코드를 이용할 수 밖에 없다. 그동안 많은 library가 나왔지만 기능에 제한적이였다면 panda-profiling을 이런것들을 다 통합한 library라 하겠다. 대표적인 기능(원문 그대로 옮긴다) Type inference: detect thetypesof columns in a dataframe. Essentials: type, unique values, missing values Quantile statisticslike minimum value, Q1, median, Q3, maximum, range, interquartile range Descripti.. 2020. 1. 15.
파이썬 팁 30 Python 3을 사용해라 2020.1.1. Python 2 지원 종료 최소 요구되는 Python 버전을 확인해라 if not sys.version_info > (2, 7): # berate your user for running a 10 year # python version elif not sys.version_info >= (3, 5): # Kindly tell your user (s)he needs to upgrade # because you're using 3.5 features IPython을 사용해라 %cd, %edit, %env, %pip install [pkgs], %time, %timeit pip3 install ipython 리스트 표현 [expression for item i.. 2020. 1. 6.