{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/eddie/.pyenv/versions/3.7.3/envs/tensorflow-1.14/lib/python3.7/site-packages/pandas/compat/__init__.py:117: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.\n",
" warnings.warn(msg)\n"
]
}
],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/Users/eddie/Documents/Programming/Python/Neural_Networks_Stuff/Course'"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pwd"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv('./Tensorflow-Bootcamp-master/00-Crash-Course-Basics/salaries.csv')"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Name | \n",
" Salary | \n",
" Age | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" John | \n",
" 50000 | \n",
" 34 | \n",
"
\n",
" \n",
" 1 | \n",
" Sally | \n",
" 120000 | \n",
" 45 | \n",
"
\n",
" \n",
" 2 | \n",
" Alyssa | \n",
" 80000 | \n",
" 27 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Name Salary Age\n",
"0 John 50000 34\n",
"1 Sally 120000 45\n",
"2 Alyssa 80000 27"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 50000\n",
"1 120000\n",
"2 80000\n",
"Name: Salary, dtype: int64"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df['Salary']"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Salary | \n",
" Name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 50000 | \n",
" John | \n",
"
\n",
" \n",
" 1 | \n",
" 120000 | \n",
" Sally | \n",
"
\n",
" \n",
" 2 | \n",
" 80000 | \n",
" Alyssa | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Salary Name\n",
"0 50000 John\n",
"1 120000 Sally\n",
"2 80000 Alyssa"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[['Salary','Name']]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Salary | \n",
" Age | \n",
"
\n",
" \n",
" \n",
" \n",
" count | \n",
" 3.000000 | \n",
" 3.000000 | \n",
"
\n",
" \n",
" mean | \n",
" 83333.333333 | \n",
" 35.333333 | \n",
"
\n",
" \n",
" std | \n",
" 35118.845843 | \n",
" 9.073772 | \n",
"
\n",
" \n",
" min | \n",
" 50000.000000 | \n",
" 27.000000 | \n",
"
\n",
" \n",
" 25% | \n",
" 65000.000000 | \n",
" 30.500000 | \n",
"
\n",
" \n",
" 50% | \n",
" 80000.000000 | \n",
" 34.000000 | \n",
"
\n",
" \n",
" 75% | \n",
" 100000.000000 | \n",
" 39.500000 | \n",
"
\n",
" \n",
" max | \n",
" 120000.000000 | \n",
" 45.000000 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Salary Age\n",
"count 3.000000 3.000000\n",
"mean 83333.333333 35.333333\n",
"std 35118.845843 9.073772\n",
"min 50000.000000 27.000000\n",
"25% 65000.000000 30.500000\n",
"50% 80000.000000 34.000000\n",
"75% 100000.000000 39.500000\n",
"max 120000.000000 45.000000"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.describe()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Name | \n",
" Salary | \n",
" Age | \n",
"
\n",
" \n",
" \n",
" \n",
" 1 | \n",
" Sally | \n",
" 120000 | \n",
" 45 | \n",
"
\n",
" \n",
" 2 | \n",
" Alyssa | \n",
" 80000 | \n",
" 27 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Name Salary Age\n",
"1 Sally 120000 45\n",
"2 Alyssa 80000 27"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[df['Salary'] > 60000]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}