Created
June 1, 2019 17:29
-
-
Save guilhermefgs/1a6ef91fc2a762c0ec46d2e5c5f73171 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"df = pd.read_csv('./Iris.csv')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Id</th>\n", | |
" <th>SepalLengthCm</th>\n", | |
" <th>SepalWidthCm</th>\n", | |
" <th>PetalLengthCm</th>\n", | |
" <th>PetalWidthCm</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>count</th>\n", | |
" <td>150.000000</td>\n", | |
" <td>150.000000</td>\n", | |
" <td>150.000000</td>\n", | |
" <td>150.000000</td>\n", | |
" <td>150.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>mean</th>\n", | |
" <td>75.500000</td>\n", | |
" <td>5.843333</td>\n", | |
" <td>3.054000</td>\n", | |
" <td>3.758667</td>\n", | |
" <td>1.198667</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>std</th>\n", | |
" <td>43.445368</td>\n", | |
" <td>0.828066</td>\n", | |
" <td>0.433594</td>\n", | |
" <td>1.764420</td>\n", | |
" <td>0.763161</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>min</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>4.300000</td>\n", | |
" <td>2.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.100000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25%</th>\n", | |
" <td>38.250000</td>\n", | |
" <td>5.100000</td>\n", | |
" <td>2.800000</td>\n", | |
" <td>1.600000</td>\n", | |
" <td>0.300000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50%</th>\n", | |
" <td>75.500000</td>\n", | |
" <td>5.800000</td>\n", | |
" <td>3.000000</td>\n", | |
" <td>4.350000</td>\n", | |
" <td>1.300000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>75%</th>\n", | |
" <td>112.750000</td>\n", | |
" <td>6.400000</td>\n", | |
" <td>3.300000</td>\n", | |
" <td>5.100000</td>\n", | |
" <td>1.800000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>max</th>\n", | |
" <td>150.000000</td>\n", | |
" <td>7.900000</td>\n", | |
" <td>4.400000</td>\n", | |
" <td>6.900000</td>\n", | |
" <td>2.500000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Id SepalLengthCm SepalWidthCm PetalLengthCm PetalWidthCm\n", | |
"count 150.000000 150.000000 150.000000 150.000000 150.000000\n", | |
"mean 75.500000 5.843333 3.054000 3.758667 1.198667\n", | |
"std 43.445368 0.828066 0.433594 1.764420 0.763161\n", | |
"min 1.000000 4.300000 2.000000 1.000000 0.100000\n", | |
"25% 38.250000 5.100000 2.800000 1.600000 0.300000\n", | |
"50% 75.500000 5.800000 3.000000 4.350000 1.300000\n", | |
"75% 112.750000 6.400000 3.300000 5.100000 1.800000\n", | |
"max 150.000000 7.900000 4.400000 6.900000 2.500000" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.describe()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"<class 'pandas.core.frame.DataFrame'>\n", | |
"RangeIndex: 150 entries, 0 to 149\n", | |
"Data columns (total 6 columns):\n", | |
"Id 150 non-null int64\n", | |
"SepalLengthCm 150 non-null float64\n", | |
"SepalWidthCm 150 non-null float64\n", | |
"PetalLengthCm 150 non-null float64\n", | |
"PetalWidthCm 150 non-null float64\n", | |
"Species 150 non-null object\n", | |
"dtypes: float64(4), int64(1), object(1)\n", | |
"memory usage: 7.1+ KB\n" | |
] | |
} | |
], | |
"source": [ | |
"df.info()" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment