목록Language/python (8)
기록
Android 기기에서 VScode를 사용하는 방법으로 Termux에서 Andronix의 moded OS를 사용하는 방법이 쉬운데, VScode가 실행되지 않을 경우가 발생합니다. 이 경우, terminal에서 code --no-sandbox 를 실행시키면 가능합니다.
주식 정보를 가져오기 위한 제일 쉽고 편리한 방법 GitHub - sharebook-kr/pykrx: KRX 주식 정보 스크래핑 GitHub - sharebook-kr/pykrx: KRX 주식 정보 스크래핑 KRX 주식 정보 스크래핑. Contribute to sharebook-kr/pykrx development by creating an account on GitHub. github.com
pandas → numpy → Tensor pdata=pd.read_csv("test.csv",header=None) ndata=np.array(pdata) tdata=torch.Tensor(ndata)
https://towardsdatascience.com/heres-how-to-make-pandas-iteration-150x-faster-20ccb5477128
외부 console 사용 https://stackoverflow.com/questions/48078722/no-multiprocessing-print-outputs-spyder No multiprocessing print outputs (Spyder) I have recently started to delve into multiprocessing, as I believe my code can be easily parallelized. Upon working through the tutorials, though, I encountered an issue: functions distributed in ... stackoverflow.com
아래 추가 __spec__ = "ModuleSpec(name='builtins', loader=)" https://stackoverflow.com/questions/45720153/python-multiprocessing-error-attributeerror-module-main-has-no-attribute Python Multiprocessing error: AttributeError: module '__main__' has no attribute '__spec__' I'm using Python 3.6 and am trying to follow along with the very first example at the website below (full code also below) and am ge..
CODE는 종목 코드 PAGES는 몇 page를 가져올지 정의 def get_frgn(CODE,PAGES): url='http://finance.naver.com/item/frgn.nhn?code={code}'.format(code=CODE) ref=pd.DataFrame() for page in range(1, PAGES): pg_url='{url}&page={page}'.format(url=url, page=page) ref=ref.append(pd.read_html(pg_url, header=0, thousands=',')[2], ignore_index=True) ref=ref.dropna() ref=ref.replace('\+','',regex=True) ref=ref.replace('\,',''..

CODE는 종목 코드 PAGES는 몇 page data를 가져올지 정의 reference: https://excelsior-cjh.tistory.com/109 def get_sise(CODE,PAGES): url='http://finance.naver.com/item/sise_day.nhn?code={code}'.format(code=CODE) ref=pd.DataFrame() for page in range(1, PAGES): pg_url='{url}&page={page}'.format(url=url, page=page) ref=ref.append(pd.read_html(pg_url, header=0)[0], ignore_index=True) ref=ref.dropna() ref.columns= ['d..