lab 1 #1
@ -31,6 +31,57 @@
|
||||
"df = pd.read_csv(\"..//..//static//csv//StudentsPerformance.csv\")\n",
|
||||
"print (df.columns)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"<class 'pandas.core.frame.DataFrame'>\n",
|
||||
"RangeIndex: 1000 entries, 0 to 999\n",
|
||||
"Data columns (total 8 columns):\n",
|
||||
" # Column Non-Null Count Dtype \n",
|
||||
"--- ------ -------------- ----- \n",
|
||||
" 0 gender 1000 non-null object\n",
|
||||
" 1 race/ethnicity 1000 non-null object\n",
|
||||
" 2 parental level of education 1000 non-null object\n",
|
||||
" 3 lunch 1000 non-null object\n",
|
||||
" 4 test preparation course 1000 non-null object\n",
|
||||
" 5 math score 1000 non-null int64 \n",
|
||||
" 6 reading score 1000 non-null int64 \n",
|
||||
" 7 writing score 1000 non-null int64 \n",
|
||||
"dtypes: int64(3), object(5)\n",
|
||||
"memory usage: 62.6+ KB\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"df.info()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" count mean std min 25% 50% 75% max\n",
|
||||
"math score 1000.0 66.089 15.163080 0.0 57.00 66.0 77.0 100.0\n",
|
||||
"reading score 1000.0 69.169 14.600192 17.0 59.00 70.0 79.0 100.0\n",
|
||||
"writing score 1000.0 68.054 15.195657 10.0 57.75 69.0 79.0 100.0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(df.describe().transpose())"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
Loading…
Reference in New Issue
Block a user