๐Ÿ“Š[DataCamp] .merge_ordered() | .merge_asof() | .melt() Course -Joining data with pandas- wrap up

2020. 9. 8. 16:31ใ†Learning archive/Data Science

 

 

.query() 

 

 

 

Reshaping data with .melt() 

 

 

UNPIVOT dataset 

 

arguments : 

id_vars ๋ณ€ํ˜•ํ•˜์ง€ ์•Š์„ ์ปฌ๋Ÿผ

value_vars ๋ณ€ํ˜•์„ ๊ฐ€ํ•  ์ปฌ๋Ÿผ

 

๐Ÿ“ŒPractice melting 

melt()๋ฅผ ํ†ตํ•ด unpivotํ•ด์•ผํ•˜๋Š” ์ด์œ  : 

In general, data is often provided (especially by governments) in a format that is easily read by people but not by machines. The .melt() method is a handy tool for reshaping data into a useful form.

 

 

original inflation Dataframe

  • In the .melt() method, the arguments value_name sets the name for values column, and var_name sets the name for the column with unpivoted headers.

melt() ๋ฅผ ํ†ตํ•ด์„œ, time series ๊ฐ€ ๋”์šฉ์ดํ•˜๊ฒŒ unpivotํ•˜์˜€๋‹ค. 

 

๐Ÿ“ŒCourse wrap up : 

well...