Data Import
Inspect DataFrame
First Few Rows of the DataFrame: This will show the first few rows of the DataFrame, which will include both the input features (columns from boston.feature_names) and the target variable 'PRICE'.
DataFrame Information: This will display details such as the total number of rows, column names, data types, and memory usage.
DataFrame Statistical Summary: This will provide basic statistics for each numerical column in the DataFrame, such as count, mean, standard deviation, minimum, 25th percentile, median (50th percentile), 75th percentile, and maximum.
.values will show data only.
.columns will show column names.
.index will show the row indexes
https://ai-fin-tech.tistory.com/entry/Sorting-DataFrame-with-pandas
Sorting DataFrame with pandas
Data Import import pandas as pd from sklearn.datasets import load_boston # Load the Boston Housing Prices dataset boston = load_boston() boston_df = pd.DataFrame(boston.data, columns=boston.feature_names) boston_df['PRICE'] = boston.target Sorting DataFram
ai-fin-tech.tistory.com
'Tech > Python' 카테고리의 다른 글
pandas - Complete Usage of loc and iloc (1) | 2023.07.30 |
---|---|
pandas - Subsetting Columns and Rows (1) | 2023.07.30 |
pandas - Sorting DataFrame (1) | 2023.07.30 |
pandas - Data Import (1) | 2023.07.30 |
기계 학습을 위한 무료 데이터셋 Top 3 (2) | 2023.07.30 |
댓글