본문 바로가기

python6

[python] Covid19 정보조회 지난 포스팅에서 Golang으로 #Covid19 각국의 감염정보를 조회하는 방법을 알아봤다https://xwing.tistory.com/169이번엔 같은 정보를 파이썬으로 만들어 보겠다.import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport requestsimport jsonr = requests.get('https://api.covid19api.com/dayone/country/korea-south/status/confirmed', stream=False)html = r.textitems = json.loads(html)df = pd.DataFrame(items)#print (df)df.to_excel (r'Covid19(S.. 2021. 1. 28.
[python] pyinstaller using pyinstaller install pip install pyinstaller site https://pyinstaller.readthedocs.io/en/stable/usage.html Using PyInstaller — PyInstaller 4.2 documentation Making GNU/Linux Apps Forward-Compatible Under GNU/Linux, PyInstaller does not bundle libc (the C standard library, usually glibc, the Gnu version) with the app. Instead, the app expects to link dynamically to the libc from the local OS .. 2021. 1. 17.
[python 기초] 엑셀에 달력출력하기 Python 과 openpyxl 을 이용해서 달력을 엑셀에 출력해 봅시다 # 달력 출력하기 from openpyxl import styles from openpyxl.styles.borders import Border, Side from openpyxl.styles import Font, Color, Alignment from openpyxl import Workbook import openpyxl import calendar import datetime BORDER_NONE = None BORDER_DASHDOT = 'dashDot' BORDER_DASHDOTDOT = 'dashDotDot' BORDER_DASHED = 'dashed' BORDER_DOTTED = 'dotted' BORDER_DOUBL.. 2021. 1. 7.
[python 기초] 엑셀에 구구단 출력하기 Python 과 python 모듈 openpyxl 을 이용해서 엑셀에 구구단을 출력해 봅시다. openpyxl 설치 site : openpyxl.readthedocs.io/en/stable/index.html openpyxl - A Python library to read/write Excel 2010 xlsx/xlsm files — openpyxl 3.0.5 documentation Install openpyxl using pip. It is advisable to do this in a Python virtualenv without system packages: Warning To be able to include images (jpeg, png, bmp,…) into an openpyxl file,.. 2021. 1. 5.
yahoo finance 크롤링 야후 파이낸스에서 일봉정보를 크롤링해 봅시다. GIST 가기 ya_fi.py GitHub Gist: instantly share code, notes, and snippets. gist.github.com import requests import datetime as pydatetime import time import datetime import json url = "https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-historical-data" toDate = datetime.date.today() fromDate = toDate - datetime.timedelta(days=10) # print (fromDate.__format__("%Y-.. 2020. 12. 19.
python - 다음 일봉 크롤링 파이썬으로 다음사이트에서 일봉을 크롤링해와 봅시다~~ # 다음 금융 일봉 크롤링 import requests from bs4 import BeautifulSoup import json url = 'https://finance.daum.net/api/charts/A066570/days?limit=200&adjusted=true' headers = { "referer": "https://finance.daum.net/chart/A005930", "user-agent": "Mozilla/5.0" } params = { "limit": "200", "adjusted": "true" } r = requests.get(url, headers=headers, params=params) szContent = r.tex.. 2020. 12. 19.