[PYTHON/PANDAS] read_parquet 함수 : PARQUET 파일 데이터 로드하기
■ read_parquet 함수를 사용해 PARQUET 파일 데이터를 로드하는 방법을 보여준다. ▶ main.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import pandas as pd dataFrame = pd.read_parquet("test.parquet") print(dataFrame) """ A B C D 2000-01-01 -1.438589 0.295868 -0.865992 -0.222044 2000-01-02 0.575768 0.399126 -1.561080 -2.560754 2000-01-03 1.112488 0.120570 -1.770755 -0.226045 2000-01-04 -1.088182 0.890816 -0.355094 0.612586 2000-01-05 -2.155150 0.112040 -0.202095 0.232846 ... ... ... ... ... 2002-09-22 -1.451799 -0.934846 0.245984 1.341718 2002-09-23 -1.185345 0.367631 1.361679 -0.349490 2002-09-24 0.088279 -1.511640 0.292758 0.898715 2002-09-25 1.279610 0.647017 2.053469 1.021641 2002-09-26 -0.783891 0.226919 0.052678 -0.999531 [1000 rows x 4 columns] """ |
▶ requirements.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 |
cramjam==2.9.0 fastparquet==2024.5.0 fsspec==2024.10.0 numpy==2.1.3 packaging==24.2 pandas==2.2.3 pyarrow==18.0.0 python-dateutil==2.9.0.post0 pytz==2024.2 six==1.16.0 tzdata==2024.2 |
※ pip install pandas pyarrow fastparquet