Skip to Content
파이썬을 활용한 금융 분석(2판) : 파이썬의 기초부터 금융공학, 머신러닝, 퀀트 분석, 매매 시스템 구현까지
book

파이썬을 활용한 금융 분석(2판) : 파이썬의 기초부터 금융공학, 머신러닝, 퀀트 분석, 매매 시스템 구현까지

by 이브 힐피시, 김도형
March 2022
Beginner to intermediate
796 pages
18h 14m
Korean
Hanbit Media, Inc.
Content preview from 파이썬을 활용한 금융 분석(2판) : 파이썬의 기초부터 금융공학, 머신러닝, 퀀트 분석, 매매 시스템 구현까지
299
9
장
입출력 작업
9.1.2
텍스트 파일 읽고 쓰기
텍스트 처리는 파이썬의 강점이다. 사실 파이썬을 상업용이나 과학기술용으로 쓰는 많은 이들
은 텍스트 처리 때문에 파이썬을 사용한다. 파이썬에서는 여러 가지 방법으로 문자열 객체와
텍스트 파일을 다룰 수 있다.
CSV
파일 형태로 저장해서 공유해야 할 대량의 데이터가 있다고 가정하자. 이 파일은 특별한
구조를 가지고 있긴 하지만 기본적으로는 일반 텍스트 파일이다. 다음 코드는 가짜 데이터 집
합을
ndarray
객체로 만들고
DatetimeIndex
객체를 생성한 다음 두 개를 합쳐서
CSV
파일
로 저장한다.
In [26]: import pandas as pd
In [27]: rows = 5000
➊
a = np.random.standard_normal((rows, 5)).round(4)
➋
In [28]: a
➋
Out[28]: array([[-0.0892, -1.0508, -0.5942, 0.3367, 1.508 ],
[ 2.1046, 3.2623, 0.704 , -0.2651, 0.4461],
[-0.0482, -0.9221, 0.1332, 0.1192, 0.7782],
...,
[ 0.3026, -0.2005, -0.9947, 1.0203, -0.6578],
[-0.7031, -0.6989, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

파이썬 라이브러리를 활용한 데이터 분석(2판): 영화 평점, 이름 통계, 선거 데이터 등 실사례 사용

파이썬 라이브러리를 활용한 데이터 분석(2판): 영화 평점, 이름 통계, 선거 데이터 등 실사례 사용

김영근, 웨스 맥키니

Publisher Resources

ISBN: 9791162245170