Skip to content

Commit

Permalink
basic pandas files using jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
linrakesh committed Apr 7, 2019
1 parent c2dd66a commit 480be1c
Show file tree
Hide file tree
Showing 9 changed files with 16,917 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Loops/for_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ def pyramid():
print(j,end=" ")
print()

pyramid()
if __name__ == '__main__':
pyramid()
2 changes: 1 addition & 1 deletion fileHandling/file_read.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file = open(r"C:\Users\acer\Desktop\PythonBox\pythonPrograms\fileHandling\abcd.txt",'r')
file = open(r"abcd.txt",'r')
data1 = file.read()
print(data1)
file.close()
36 changes: 36 additions & 0 deletions hello.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- mode: python -*-

block_cipher = None


a = Analysis(['hello.py'],
pathex=['C:\\Users\\as\\Desktop\\python'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='hello',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='hello')
6 changes: 6 additions & 0 deletions pandas/.ipynb_checkpoints/Untitled-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}
32 changes: 32 additions & 0 deletions pandas/.ipynb_checkpoints/hello-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"cells": [
{
"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.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
6 changes: 6 additions & 0 deletions pandas/Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}
3 changes: 0 additions & 3 deletions pandas/basic.py

This file was deleted.

235 changes: 235 additions & 0 deletions pandas/hello.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(16598, 11)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"df = pd.read_csv('vgsales.csv')\n",
"df.shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df.describe()"
]
},
{
"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>Rank</th>\n",
" <th>Year</th>\n",
" <th>NA_Sales</th>\n",
" <th>EU_Sales</th>\n",
" <th>JP_Sales</th>\n",
" <th>Other_Sales</th>\n",
" <th>Global_Sales</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>16598.000000</td>\n",
" <td>16327.000000</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>8300.605254</td>\n",
" <td>2006.406443</td>\n",
" <td>0.264667</td>\n",
" <td>0.146652</td>\n",
" <td>0.077782</td>\n",
" <td>0.048063</td>\n",
" <td>0.537441</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>4791.853933</td>\n",
" <td>5.828981</td>\n",
" <td>0.816683</td>\n",
" <td>0.505351</td>\n",
" <td>0.309291</td>\n",
" <td>0.188588</td>\n",
" <td>1.555028</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>1.000000</td>\n",
" <td>1980.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.010000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>4151.250000</td>\n",
" <td>2003.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.060000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>8300.500000</td>\n",
" <td>2007.000000</td>\n",
" <td>0.080000</td>\n",
" <td>0.020000</td>\n",
" <td>0.000000</td>\n",
" <td>0.010000</td>\n",
" <td>0.170000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>12449.750000</td>\n",
" <td>2010.000000</td>\n",
" <td>0.240000</td>\n",
" <td>0.110000</td>\n",
" <td>0.040000</td>\n",
" <td>0.040000</td>\n",
" <td>0.470000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>16600.000000</td>\n",
" <td>2020.000000</td>\n",
" <td>41.490000</td>\n",
" <td>29.020000</td>\n",
" <td>10.220000</td>\n",
" <td>10.570000</td>\n",
" <td>82.740000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Rank Year NA_Sales EU_Sales JP_Sales \\\n",
"count 16598.000000 16327.000000 16598.000000 16598.000000 16598.000000 \n",
"mean 8300.605254 2006.406443 0.264667 0.146652 0.077782 \n",
"std 4791.853933 5.828981 0.816683 0.505351 0.309291 \n",
"min 1.000000 1980.000000 0.000000 0.000000 0.000000 \n",
"25% 4151.250000 2003.000000 0.000000 0.000000 0.000000 \n",
"50% 8300.500000 2007.000000 0.080000 0.020000 0.000000 \n",
"75% 12449.750000 2010.000000 0.240000 0.110000 0.040000 \n",
"max 16600.000000 2020.000000 41.490000 29.020000 10.220000 \n",
"\n",
" Other_Sales Global_Sales \n",
"count 16598.000000 16598.000000 \n",
"mean 0.048063 0.537441 \n",
"std 0.188588 1.555028 \n",
"min 0.000000 0.010000 \n",
"25% 0.000000 0.060000 \n",
"50% 0.010000 0.170000 \n",
"75% 0.040000 0.470000 \n",
"max 10.570000 82.740000 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.describe()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[1, 'Wii Sports', 'Wii', ..., 3.77, 8.46, 82.74],\n",
" [2, 'Super Mario Bros.', 'NES', ..., 6.81, 0.77, 40.24],\n",
" [3, 'Mario Kart Wii', 'Wii', ..., 3.79, 3.31, 35.82],\n",
" ...,\n",
" [16598, 'SCORE International Baja 1000: The Official Game', 'PS2',\n",
" ..., 0.0, 0.0, 0.01],\n",
" [16599, 'Know How 2', 'DS', ..., 0.0, 0.0, 0.01],\n",
" [16600, 'Spirits & Spells', 'GBA', ..., 0.0, 0.0, 0.01]],\n",
" dtype=object)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.values"
]
}
],
"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.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 480be1c

Please sign in to comment.