#파일 불러오기, 컬럼명 변경경
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
!pip install pyreadstat
raw_welfare=pd.read_spss('data/Koweps_hpwc14_2019_beta2.sav')
welfare=raw_welfare.copy()
welfare=welfare.rename(
columns={"h14_g3": "sex",
"h14_g4": "birth",
"h14_g10": "marriage_type",
"h14_g11": "religion",
"p1402_8aq1": "income",
"h14_eco9" : "code_job",
"h14_reg7" : "code_region"})
welfare=welfare[["sex","birth","marriage_type","religion","income","code_job","code_region"]]
Requirement already satisfied: pyreadstat in c:\ds\python\python312\lib\site-packages (1.2.7)
Requirement already satisfied: pandas>=1.2.0 in c:\ds\python\python312\lib\site-packages (from pyreadstat) (2.2.2)
Requirement already satisfied: numpy>=1.26.0 in c:\ds\python\python312\lib\site-packages (from pandas>=1.2.0->pyreadstat) (2.0.0)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\ds\python\python312\lib\site-packages (from pandas>=1.2.0->pyreadstat) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in c:\ds\python\python312\lib\site-packages (from pandas>=1.2.0->pyreadstat) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in c:\ds\python\python312\lib\site-packages (from pandas>=1.2.0->pyreadstat) (2024.1)
Requirement already satisfied: six>=1.5 in c:\ds\python\python312\lib\site-packages (from python-dateutil>=2.8.2->pandas>=1.2.0->pyreadstat) (1.16.0)