Programming Language/Python

Programming Language/Python

[Python] 주식을 종가 기준으로 그래프 그리는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] matplotlib 그래프 여러개 그리는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] ImportError: cannot import name 'MappingProxyType' from 'types' 에러해결

다음 에러 발생 Traceback (most recent call last): File "types.py", line 1, in import requests File "/usr/local/lib/python3.8/dist-packages/requests/__init__.py", line 43, in import urllib3 File "/usr/local/lib/python3.8/dist-packages/urllib3/__init__.py", line 7, in import logging File "/usr/lib/python3.8/logging/__init__.py", line 26, in import sys, os, time, io, re, traceback, warnings, weakref, col..

Programming Language/Python

[Python] 그래프 4개를 한번에 그리는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] 최근 3년, 1년, 6개월, 3개월에 대한 지수 평가하는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] 코스피와 환율의 상대평가 하는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] 최근 3년의 코스피, 환율 그래프 그리는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] 코스닥, 코스피, 환율 그래프 그리는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] 주식의 평균값을 그래프로 나타내는 방법

''' pip install pandas,beautifulsoup4,finance-datareader,matplotlib -y ''' import pandas as pd import matplotlib.pyplot as plt import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_c..

Programming Language/Python

[Python] 파이썬으로 전기제품 관련 회사의 주식 확인하는 방법

''' pip install pandas,beautifulsoup4,finance-datareader -y ''' import pandas as pd import FinanceDataReader as fdr from datetime import datetime from dateutil.relativedelta import relativedelta def get_stock_code(name): '''이름을 입력하면 코드를 리턴''' df = fdr.StockListing('KRX') stock_code = df[df['Name'] == name]['Code'].to_string(index = False) return stock_code if __name__ == '__main__': before_one_w..

박경태
'Programming Language/Python' 카테고리의 글 목록 (7 Page)