Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solange garrais #3

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
18b9418
Became the authot of groupby
AntoineLegrain Jan 16, 2020
aaa7bd7
Changed DataFrame_pivot_table.py
KwangilChi Jan 16, 2020
8400498
Update DataFrame_Groupby.py
AntoineLegrain Jan 16, 2020
283cf43
Creating conflict
AntoineLegrain Jan 16, 2020
5d5ea8b
added conflict
KwangilChi Jan 16, 2020
b746e38
Trying to solve conflict
AntoineLegrain Jan 16, 2020
3f2407f
Files added from myspace
KwangilChi Jan 16, 2020
05e4439
conflict
KwangilChi Jan 16, 2020
8a884f6
youshallnotpassmate
KwangilChi Jan 16, 2020
16074ae
'Trying some stuff to confuse you more'
AntoineLegrain Jan 16, 2020
269c8cb
Shame on you.
AntoineLegrain Jan 16, 2020
f3cfbd8
Merge branch 'myspace'
KwangilChi Jan 16, 2020
f2815d2
Merge branch 'master' of https://github.com/AntoineLegrain/Example_Pa…
KwangilChi Jan 16, 2020
887ad63
Solve this conflict!
KwangilChi Jan 16, 2020
0ca4ade
added new dir and file called tree_branch
KwangilChi Jan 16, 2020
612ca0c
Merge pull request #1 from AntoineLegrain/tree_branch
KwangilChi Jan 16, 2020
9ed7c0d
Modif author_ Solange
SolangeGarrais Jan 16, 2020
177a1cf
Merge branch 'master' of https://github.com/AntoineLegrain/Example_Pa…
SolangeGarrais Jan 16, 2020
687e5df
Challenge for you Solange!
KwangilChi Jan 16, 2020
cc9177c
Revert "Hey guys"
AntoineLegrain Jan 16, 2020
35530cf
Merge pull request #2 from AntoineLegrain/revert-1-tree_branch
AntoineLegrain Jan 16, 2020
8db2e1f
Solange
SolangeGarrais Jan 16, 2020
db2ac09
Merge branch 'master' of https://github.com/AntoineLegrain/Example_Pa…
SolangeGarrais Jan 16, 2020
fc37d1d
Nice try!
AntoineLegrain Jan 16, 2020
c945af1
Merge branch 'master' of https://github.com/AntoineLegrain/Example_Pa…
KwangilChi Jan 16, 2020
5c45f8a
Merge branch 'master' of https://github.com/AntoineLegrain/Example_Pa…
KwangilChi Jan 16, 2020
36ed7f9
Merge branch 'tree_branch' of https://github.com/AntoineLegrain/Examp…
KwangilChi Jan 16, 2020
7bc4fc1
Merge branch 'master' into tree_branch
AntoineLegrain Jan 16, 2020
8c10c86
Merge branch 'tree_branch'
KwangilChi Jan 16, 2020
faecdc3
Merge branch 'tree_branch' of https://github.com/AntoineLegrain/Examp…
AntoineLegrain Jan 16, 2020
9e06744
Merge branch 'tree_branch'
AntoineLegrain Jan 16, 2020
dfb0535
isthissolved
SolangeGarrais Jan 16, 2020
e50d42d
resolved
SolangeGarrais Jan 16, 2020
cb736b7
add author Eugénie
eugeniedionnet Jan 16, 2020
983d998
Added my name all over again.
AntoineLegrain Jan 16, 2020
f2ddf66
fruit challenge
KwangilChi Jan 16, 2020
1e2ec81
delete_me added
KwangilChi Jan 16, 2020
4e57bc0
fromnewbranch
SolangeGarrais Jan 16, 2020
dbd47e0
Merge branch 'master' of https://github.com/AntoineLegrain/Example_Pa…
eugeniedionnet Jan 16, 2020
dfe841c
fix convert object
SolangeGarrais Jan 16, 2020
79b0554
convert objet
SolangeGarrais Jan 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .ipynb_checkpoints/Untitled1-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}
12 changes: 9 additions & 3 deletions DataFrame_Groupby.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# -*- coding: utf-8 -*-
__author__ = 'Who ?'
"* -*- coding: utf-8 -*-"

<<<<<<< HEAD
"__message to author__ = 'solvethisconflict!'"
=======
__author__ = 'Antoine'
#Stop messing with my name
>>>>>>> origin

import pandas as pd
import numpy as np
Expand All @@ -24,7 +30,7 @@


def cloneDF(df):
return pd.DataFrame(df.values.copy(), df.index.copy(), df.columns.copy()).convert_objects(convert_numeric=True)
return pd.DataFrame(df.values.copy(), df.index.copy(), df.columns.copy()).apply(pd.to_numeric, errors='coerce')


# Show Films with more votes. (groupby + sorted)
Expand Down
2 changes: 1 addition & 1 deletion DataFrame_pivot_table.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__author__ = 'Who ?'
__author__ = 'KwangilChi'

import pandas as pd
import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions Example_MovieLens.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
__author__ = 'Who ?'

author == Solange

import pandas as pd

# Load users info
Expand Down
3 changes: 2 additions & 1 deletion Series_vs_DataFrame.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

# -*- coding: utf-8 -*-
__author__ = 'Who ?'
__author__ = 'Eugénie'

import pandas as pd

Expand Down
89 changes: 89 additions & 0 deletions Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'DataFrame_Groupby'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-5-78b7ea5b4db3>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mDataFrame_Groupby\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'DataFrame_Groupby'"
]
}
],
"source": [
"import DataFrame_Groupby \n",
"\n"
]
}
],
"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.4"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
150 changes: 150 additions & 0 deletions Untitled1.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Films with more votes: \n",
"Series([], dtype: int64)\n",
"\n",
"==================================================================\n",
"\n",
"Avg ratings: \n",
"Series([], Name: rating, dtype: int64)\n",
"\n",
"==================================================================\n",
"\n",
"Films ratings info: \n",
"Empty DataFrame\n",
"Columns: [mean, sum, count, std]\n",
"Index: []\n",
"\n",
"==================================================================\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/campus14/Documents/Git/4_collaborer/Example_Pandas/DataFrame_Groupby.py:57: FutureWarning: using a dict on a Series for aggregation\n",
"is deprecated and will be removed in a future version. Use named aggregation instead.\n",
"\n",
" >>> grouper.agg(name_1=func_1, name_2=func_2)\n",
"\n",
" {'SUM': np.sum, 'COUNT': np.size, 'AVG': np.mean, 'myAVG': lambda x: x.sum() / float(x.count())})\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"My info ratings: \n",
"Empty DataFrame\n",
"Columns: [SUM, COUNT, AVG, myAVG]\n",
"Index: []\n",
"\n",
"==================================================================\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/campus14/Documents/Git/4_collaborer/Example_Pandas/DataFrame_Groupby.py:65: FutureWarning: using a dict on a Series for aggregation\n",
"is deprecated and will be removed in a future version. Use named aggregation instead.\n",
"\n",
" >>> grouper.agg(name_1=func_1, name_2=func_2)\n",
"\n",
" {'COUNT': np.size, 'myAVG': lambda x: x.sum() / float(x.count())}).sort_values('COUNT', ascending=False)\n"
]
},
{
"ename": "AttributeError",
"evalue": "'DataFrame' object has no attribute 'sort'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-4-9c185be770fb>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mDataFrame_Groupby\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m~/Documents/Git/4_collaborer/Example_Pandas/DataFrame_Groupby.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 63\u001b[0m \u001b[0msortRatingsField\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcloneDF\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmergeRatings\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 64\u001b[0m sortRatingsField = sortRatingsField.groupby(['movie_id', 'title'])['rating'].agg(\n\u001b[0;32m---> 65\u001b[0;31m {'COUNT': np.size, 'myAVG': lambda x: x.sum() / float(x.count())}).sort('COUNT', ascending=False)\n\u001b[0m\u001b[1;32m 66\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'My info sorted: \\n%s'\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0msortRatingsField\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;36m15\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 5177\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_info_axis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_can_hold_identifiers_and_holds_name\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5178\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 5179\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mobject\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5180\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5181\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__setattr__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mAttributeError\u001b[0m: 'DataFrame' object has no attribute 'sort'"
]
}
],
"source": [
"from DataFrame_Groupby import *"
]
}
],
"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.4"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
1 change: 1 addition & 0 deletions delete_me.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete this file when you find it
3 changes: 3 additions & 0 deletions fruit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Name a red fruit then come up with a question:


1 change: 1 addition & 0 deletions tree_branch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@