Programming Language/Python
2023.02.07
''' 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
2023.02.07
''' 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
2023.02.07
다음 에러 발생 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
2023.02.05
''' 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
2023.02.05
''' 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
2023.02.05
''' 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
2023.02.05
''' 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
2023.02.05
''' 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
2023.02.05
''' 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
2023.01.29
''' 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..