피그워커 0.1.6.업데이트
각 업데이트마다 PygWalker 변경 로그 페이지에 새로운 기능, 개선 사항, 버그 수정이 나열되어 있습니다.
출시일: 2023년 3월 14일.
기능 하이라이트:
- 이제 시각화를 코드로 내보낼 수 있습니다.
이 새로운 기능을 사용하는 단계:
1.도구 모음에서코드로 내보내기 버튼을 클릭합니다.버튼은 “PNG/SVG로 내보내기” 버튼 옆에 있습니다.
2.시각화는 코드로 사용할 수 있습니다.클릭보드에 복사 버튼을 클릭하여 코드를 저장합니다.
3.PygWalker에서 코드를 가져오려면 방금 다운로드한 코드를 다음과 같이 가져오면 됩니다. vis_spec
:
2.데이터 시각화는 에 저장됩니다 vis_spec
끈.
샘플 vis_spec
문자열:
vis_spec = """
[{"visId":"65b894b5-23fb-4aa6-8f31-d0e1a795d9de","name":"Chart 1","encodings":{"dimensions":[{"dragId":"9e1666ef-461d-4550-ac6a-465a74eb281d","fid":"gwc_1","name":"date","semanticType":"temporal","analyticType":"dimension"},{"dragId":"d2164142-30f7-41a3-a1df-0a0e4ebf1de2","fid":"gwc_2","name":"month","semanticType":"ordinal","analyticType":"dimension"},{"dragId":"7d40982e-4b76-45ed-91a8-25d25a0b4ae8","fid":"gwc_3","name":"season","semanticType":"nominal","analyticType":"dimension"},{"dragId":"28204432-cc53-4c17-9c3e-201bb1c6fd69","fid":"gwc_5","name":"year","semanticType":"nominal","analyticType":"dimension"},{"dragId":"75628c6d-4d67-4f95-96e9-0a614514d199","fid":"gwc_6","name":"holiday","semanticType":"nominal","analyticType":"dimension"},{"dragId":"b66191c8-8798-4355-87d5-0b65b014d703","fid":"gwc_14","name":"work yes or not","semanticType":"nominal","analyticType":"dimension"},{"dragId":"9abd2352-722c-494d-a605-05674c422142","fid":"gwc_15","name":"am or pm","semanticType":"nominal","analyticType":"dimension"},{"dragId":"c61bd371-dcc8-43c6-af41-e80bf20eb457","fid":"gwc_16","name":"Day of the week","semanticType":"ordinal","analyticType":"dimension"}],"measures":[{"dragId":"d4e3d4f4-d9ad-47cb-9774-8eacc608501a","fid":"gwc_0","name":"index","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"a42d4ea2-c74c-4e6c-81f3-fa58145d9fc4","fid":"gwc_4","name":"hour","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"d72e7d5d-cc1e-46d3-988c-b0f25c68e069","fid":"gwc_7","name":"temperature","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"82e03549-2840-4779-8c87-9bd642d15cbe","fid":"gwc_8","name":"feeling_temp","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"615fafa5-9c75-43b5-a7b7-a797309064fa","fid":"gwc_9","name":"humidity","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"9da93314-e617-4fbc-9e88-eeef46275083","fid":"gwc_10","name":"winspeed","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"0bee609f-6a15-4dfc-8196-e55a7fab6085","fid":"gwc_11","name":"casual","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"4170fac2-46a6-43e7-be73-fd3dd39ffe7a","fid":"gwc_12","name":"registered","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"bd1b1e87-aecd-41de-8888-9ccbe13f2e5f","fid":"gwc_13","name":"count","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"b49622a7-5acf-4925-a817-8ad4ae7bc4c8","fid":"gw_count_fid","name":"Row count","analyticType":"measure","semanticType":"quantitative","aggName":"sum"}],"fields":[{"dragId":"61b1cac3-c58d-49f5-8cbe-282357895bc6","fid":"gwc_0","name":"index","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"db165342-0017-4fa3-89f0-efffaedf5087","fid":"gwc_1","name":"date","analyticType":"dimension","semanticType":"temporal"},{"dragId":"ee625e2d-958a-425b-b13e-0cc59d286fc6","fid":"gwc_2","name":"month","analyticType":"dimension","semanticType":"ordinal"},{"dragId":"c73d0141-998f-4caf-ad03-23849d42f025","fid":"gwc_3","name":"season","analyticType":"dimension","semanticType":"nominal"},{"dragId":"c4a3743c-6400-4466-928f-a2b40f7de920","fid":"gwc_4","name":"hour","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"c0acb711-2f54-41b5-a4f0-d355d8f6998f","fid":"gwc_5","name":"year","analyticType":"dimension","semanticType":"nominal"},{"dragId":"9ad81c68-5329-42eb-9b3a-a813a9482e9b","fid":"gwc_6","name":"holiday","analyticType":"dimension","semanticType":"nominal"},{"dragId":"f135914b-7a58-4f69-bf6e-4328a42c76a0","fid":"gwc_7","name":"temperature","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"4eda6f67-0d64-4b85-9895-ff8dd7c4dab5","fid":"gwc_8","name":"feeling_temp","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"cfa84897-13c9-45ec-addb-2a3135d0113d","fid":"gwc_9","name":"humidity","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"abe15c87-7364-4687-beda-ba11d30c2262","fid":"gwc_10","name":"winspeed","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"5ca1464d-3dc6-4a80-b78c-a6f91ef11e72","fid":"gwc_11","name":"casual","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"a6e553e7-32a2-4aed-b590-02308fb7cac1","fid":"gwc_12","name":"registered","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"37f8fc74-06c2-43bb-98dc-135efdad6a69","fid":"gwc_13","name":"count","aggName":"sum","analyticType":"measure","semanticType":"quantitative"},{"dragId":"c5916915-203b-457c-ba6a-2e28c21694b2","fid":"gwc_14","name":"work yes or not","analyticType":"dimension","semanticType":"nominal"},{"dragId":"ac293432-2c09-4104-bb95-8027f94a310e","fid":"gwc_15","name":"am or pm","analyticType":"dimension","semanticType":"nominal"},{"dragId":"0020d11e-6bcd-44cb-919b-6cb3f6d5fa0f","fid":"gwc_16","name":"Day of the week","analyticType":"dimension","semanticType":"ordinal"},{"dragId":"9ffc9ee4-3413-432f-9606-6c44ea3717da","fid":"gw_count_fid","name":"Row count","aggName":"sum","analyticType":"measure","semanticType":"quantitative"}],"rows":[{"dragId":"cc52d32f-1438-4523-b20a-b7c8346327d1","fid":"gwc_7","name":"temperature","analyticType":"measure","semanticType":"quantitative","aggName":"sum"},{"dragId":"7a693f90-6e5a-4032-a800-f3162efeb2c6","fid":"gwc_10","name":"winspeed","analyticType":"measure","semanticType":"quantitative","aggName":"sum"}],"columns":[{"dragId":"b9abe5dd-4ebd-47a0-b7a6-66730c2eb3dc","fid":"gwc_5","name":"year","semanticType":"nominal","analyticType":"dimension"}],"color":[],"opacity":[],"size":[],"shape":[],"radius":[],"theta":[],"details":[],"filters":[]},"config":{"defaultAggregated":true,"geoms":["auto"],"stack":"stack","showActions":false,"interactiveScale":false,"sorted":"none","size":{"mode":"auto","width":320,"height":200},"exploration":{"mode":"none","brushDirection":"default"}}}]
"""
그리고 파이그워커에 다음을 로드하십시오. vis_spec
:
pyg.walk(df, spec=vis_spec)
4.다음과 같은 방법으로 내장 도움말 문서를 호출할 수 있습니다.
help(pyg.walk)
또한 간략한 개요를 볼 수도 있습니다. vis_spec
다음과 같은 방식으로 문자열을 입력합니다.
pyg.to_html(df, spec=vis_spec)
샘플 출력:
Signature: pyg.walk(df: 'pl.DataFrame | pd.DataFrame', gid: Union[int, str] = None, *, env: Literal['Jupyter', 'Streamlit'] = 'Jupyter', **kwargs)
Docstring:
Walk through pandas.DataFrame df with Graphic Walker
Args:
- df (pl.DataFrame | pd.DataFrame, optional): dataframe.
- gid (Union[int, str], optional): GraphicWalker container div's id ('gwalker-{gid}')
Kargs:
- env: (Literal['Jupyter' | 'Streamlit'], optional): The enviroment using pygwalker. Default as 'Jupyter'
- hideDataSourceConfig (bool, optional): Hide DataSource import and export button (True) or not (False). Default to True
- themeKey ('vega' | 'g2'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- return_html (bool, optional): Directly return a html string. Defaults to False.
File: /usr/local/lib/python3.9/dist-packages/pygwalker/gwalker.py
Type: function
기타 개선 사항:
- 그래픽-워커를 0.2.15로 상향 조정 (opens in a new tab)
- 데이터브릭에 대한 지원 추가 (opens in a new tab)
- VSCode용 주피터 익스텐션 지원 추가 (opens in a new tab)
- 비포지션 채널에 대한 지원 어그리게이션 및 DnD 추가 (opens in a new tab)
- 스트림릿 환경 지원 및 주피터 및 스트림릿 만들기 (opens in a new tab)
- 캐글 노트북을 지원하도록 JS 모듈 형식 변경 (opens in a new tab)
- 다크 테마 지원 (opens in a new tab)
- DataFrame의 특수 문자 관련 오류 수정 (opens in a new tab)
- 파싱 문제 수정 (opens in a new tab)
- 멀티인덱스 인코딩 오류 수정 (opens in a new tab)
- 더 간결한 API (opens in a new tab)