CASTable 데이터를 matplotlib로 간편하게 그래프로 표시
3324 단어 파이썬matplotlib사랑SAS기계 학습
CASTable 얻기
먼저 CASTable을 가져옵니다. 이번에는 CSV를 데이터 소스로 사용합니다.
tbl = conn.loadtable('data/iris.csv', caslib='casuser').casTable
그래프화
라이브러리를 가져옵니다. Jupyter Notebook에서 인라인으로 표시하도록 지정합니다.
%matplotlib inline
# from matplotlib.pyplot import show
plot 메소드로 그래프를 출력합니다.
tbl.plot()

그리기 대상을 좁히기
키로 출력 대상을 좁힐 수 있습니다.
tbl[['sepal_length', 'sepal_width']].plot()

그래프 유형 변경
plot 메서드에 옵션을 지정하여 그래프 유형을 변경합니다.
tbl[['sepal_length', 'sepal_width']].plot(kind='area')

메소드 체인에서도 변경할 수 있습니다.
tbl[['sepal_length', 'sepal_width']].plot.area()

요약
CASTable을 사용하면 데이터를 검색하고 시각화할 때까지 매우 쉽게 실현할 수 있습니다. 데이터를 좁히거나 재정렬하면서 그래프에 그리는 것도 간단합니다. 꼭 여러분의 데이터 분석에 도움을 주시기 바랍니다.
SAS 비야 | SAS
Reference
이 문제에 관하여(CASTable 데이터를 matplotlib로 간편하게 그래프로 표시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ViyaDev/items/9b0eb8a0065b47586312텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)