Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- aiohttp
- 특정값지우기
- AI #RNN #LSTM #LSTMP #인공지능 #언어학습 #순차학습
- SQL #PostgreSQL
- tensorflow #tensorflow-gpu #python #ubuntu #텐서플로우
- ngrok
- 깃
- 시계열데이터
- Asyncio
- AI #Inductive_Bias #Relational_inductive_bias
- pandas #python #date #datetime
- SQL #python #MySQL #PostgreSQL
- python #pandas #data_preprocessing #data_process
- MachineLearning
- REST_API
- 비동기모듈
- 선형회귀
- 파이썬
- TensorFlow
- Github
- Python
- pandas #ewma #python #지수이동가중평균 #파이썬 #판다스 #ema #ewm
- git
- 판다스 #Pandas #DataFrame #Statistics #통계 #파이썬 #Python #Resample
- 깃허브
- pandas #python #excel #판다스 #파이썬 #엑셀저장 #xlsxwriter
- version_error
- tf.where
- mnist
- fashionmnist
Archives
- Today
- Total
린스토리
[Pandas] DataFrame 생성 본문
Pandas
데이터 조작 및 분석을 위한 Python 프로그래밍 언어 용으로 작성된 소프트웨어 라이브러리.
특히, 숫자 테이블과 시계열을 조작하기 위한 데이터 구조와 연산을 제공. (위키백과)
Pandas에서 DataFrame 생성
import pandas as pd
df = pd.DataFrame(columns=['Age', 'Name', 'Sex', 'Job'])

import pandas as pd
df = pd.DataFrame({
"name" : ['TIM', 'TAM', 'TOM'],
"job" : ['Student', 'Banker', 'Player'],
"City" : ['L.A', 'Texas', 'N.Y']})

DataFrame에 list로 값 넣기(loc)
mike = [20, 'mike', 'male', 'student']
rilly = [24, 'rilly', 'female', 'nurse']
df.loc[0] = mike
df.loc[1] = rilly

CSV , Excel 파일 불러와서 DataFrame 만들기
import pandas as pd
df_1 = pd.read_csv('test.csv')
df_2 = pd.read_excel('test_excel.xlsx')
Pandas를 활용해 데이터 분석 하는 법을 다룰 예정..!
오늘도 Pandas가 있기에 행벅하다.
'Python > Pandas' 카테고리의 다른 글
| [Pandas] EWMA 적용하기 (0) | 2022.06.30 |
|---|---|
| [Pandas] Excel로 저장하기 (시트 여러개로 나눠서 저장하기) (0) | 2022.06.29 |
| [Pandas] 월별/주별/일별 데이터 통계내기 (Resample) (0) | 2022.06.28 |
| [Pandas] 날짜 생성하기 & 연산하기 (0) | 2022.06.19 |
| [Pandas] 조건 해당 값 변경 (0) | 2022.06.18 |
Comments