๐[DataCamp] Pandas : Slicing and subsetting with .loc and .iloc, Working with pivot tables
2020. 9. 6. 02:01ใLearning archive/Data Science
Slicing lets you select consecutive elements of an object using first:last syntax. DataFrames can be sliced by index values, or by row/column number; we'll start with the first case. This involves slicing inside the .loc[] method.
๐ Data Frame์ Slice ์ ์ Sort the index!
๐ Outer index level .loc["" : ""]
๐ inner index levels : ํํ๋ก Sliceํ๊ธฐ
๐Columns ์ฌ๋ผ์ด์ฑ
๐ ํ๊ณผ ์ด์ ๋ชจ๋ sliceํ๊ธฐ
๐ Practice : Subsetting rows, cols, both
๐Working with pivot tables
๐Review : a pivot table
๐.mean(axis="")