■ dir 함수를 사용해 PlotAccessor 클래스의 메소드를 출력하는 방법을 보여준다.
▶ main.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import pandas as pd dataFrame = pd.read_csv("air_quality_no2.csv", index_col = 0, parse_dates = True) plotAccessor = dataFrame.plot methodNameList = [methodName for methodName in dir(plotAccessor) if not methodName.startswith("_")] for methodName in methodNameList: print(methodName) """ area bar barh box density hexbin hist kde line pie scatter """ |
▶ requirements.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
contourpy==1.3.0 cycler==0.12.1 fonttools==4.54.1 kiwisolver==1.4.7 matplotlib==3.9.2 numpy==2.1.2 packaging==24.1 pandas==2.2.3 pillow==11.0.0 pyparsing==3.2.0 python-dateutil==2.9.0.post0 pytz==2024.2 six==1.16.0 tzdata==2024.2 |
※ pip install pandas matplotlib 명령을 실행했다.