1. 程式人生 > >將數據合並為dataframe

將數據合並為dataframe

Coding list das ram port pri column pan odi

#!/usr/bin/env python
# -*- coding:utf-8 -*-
import pandas as pd
salary = [4000,8000,5000,7500,12000]
age = [25,30,28,33,40]
limit = [20000,70000,35000,50000,85000]
set = list(zip(salary,age,limit))

df = pd.DataFrame(data = set,columns=[‘salary‘,‘age‘,‘limit‘])
print(df)

將數據合並為dataframe