Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes |
teaching:progappchim:pandas [2020/08/27 11:16] – [Références] villersd | teaching:progappchim:pandas [2022/03/21 09:43] – villersd |
---|
| |
Extensions : | Extensions : |
* Tester et utiliser en mode "Jupyter" | * Tester et utiliser en mode [[jupyter|"Jupyter"]] |
| * si vous n'y arrivez pas, vous pouvez utiliser ce fichier : {{:teaching:progappchim:body_dimensions_01.ipynb}} |
* créer des régressions | * créer des régressions |
* autres représentations | * autres représentations |
namesfr = [ | namesfr = [ |
'Largeur des épaules', | 'Largeur des épaules', |
'Largueur des hanches', | 'Largeur des hanches', |
'Largueur entre têtes de fémur', | 'Largeur entre têtes de fémur', |
'Epaisseur du thorax', | 'Epaisseur du thorax', |
'Largueur du thorax', | 'Largeur du thorax', |
'Largueur du coude', | 'Largeur du coude', |
'Largueur du poignet', | 'Largeur du poignet', |
'Largueur du genou', | 'Largeur du genou', |
'Largueur de la cheville', | 'Largeur de la cheville', |
'Tour d’épaules', | 'Tour d’épaules', |
'Tour de poitrine', | 'Tour de poitrine', |
'Tour de taille', | 'Tour de taille', |
'Tour au niveau du nombril', | 'Tour au niveau du nombril', |
'Tour de hanches', | 'Tour de hanches', |
'Tour de cuisse', | 'Tour de cuisse', |
'Tour du biceps', | 'Tour du biceps', |
'Tour de l’avant-bras', | 'Tour de l’avant-bras', |
'Tour de genou', | 'Tour de genou', |
'Plus grande circonférence du mollet', | 'Plus grande circonférence du mollet', |
'Plus petite circonférence de la cheville', | 'Plus petite circonférence de la cheville', |
'Plus petite circonférence du poignet', | 'Plus petite circonférence du poignet', |
'Âge', | 'Âge', |
'Poids', | 'Poids', |
'Taille', | 'Taille', |
'Genre', | 'Genre', |
] | ] |
| |
plt.figure() | plt.figure() |
df.Weight.plot.hist() | df.Weight.plot.hist() |
| |
| plt.show() |
</code> | </code> |
| |
| === Suggestions pour ajouter une régression linéaire === |
| FIXME |
| * librairie scipy, fonction stats.linregress |
| |
| Codes (à combiner...) |
| |
| <code python> |
| import pandas as pd |
| from scipy import stats |
| </code> |
| |
| Références : |
| * [[https://www.delftstack.com/api/scipy/scipy-scipy.stats.linregress-method/|SciPy scipy.stats.linregress Method]] |
| * [[https://medium.com/analytics-vidhya/linear-regression-in-python-from-scratch-with-scipy-statsmodels-sklearn-da8e373cc89b|Linear Regression in python from scratch with scipy, statsmodels, sklearn]] |
| * [[https://towardsdatascience.com/adding-regression-lines-to-pandas-plots-with-scipy-2e23fd524adb|Adding Regression Lines to Pandas Plots with SciPy]] (yc Jupyter notebook sur GitHub) |
| * cf. [[matplotlib_simple]] |
| |
===== Interface utilisateur graphique ===== | ===== Interface utilisateur graphique ===== |
* [[https://github.com/adamerose/pandasgui|PandasGUI]] | * [[https://github.com/adamerose/pandasgui|PandasGUI]] |
| * [[https://towardsdatascience.com/pandasgui-analyzing-pandas-dataframes-with-a-graphical-user-interface-36f5c1357b1d|PandasGUI: Analyzing Pandas dataframes with a Graphical User Interface - Accessing Pandas Dataframes with a simple click of the mouse]] Parul Pandey, Medium, 24/10/2020 |
* [[https://github.com/tkrabel/bamboolib|bamboolib]] (closed source - non libre) | * [[https://github.com/tkrabel/bamboolib|bamboolib]] (closed source - non libre) |
| |
===== Références ===== | ===== Références ===== |
* [[https://www.tutorialspoint.com/python_pandas/index.htm]] | * [[https://www.tutorialspoint.com/python_pandas/index.htm]] |
| * [[https://towardsdatascience.com/top-4-repositories-on-github-to-learn-pandas-1008cb769f77|Top 4 Repositories on GitHub to Learn Pandas - Some of the most popular repositories to brush up on Pandas for beginners and experts alike]] Byron Dolon, Medium, Jul 21, 2020 |
| * [[https://github.com/guipsamora/pandas_exercises|GitHub - guipsamora/pandas_exercises: Practice your pandas skills!]] |
| * [[https://github.com/justmarkham/pandas-videos|GitHub - justmarkham/pandas-videos: Jupyter notebook and datasets from the pandas Q&A video series]] |
| * [[https://github.com/ajcr/100-pandas-puzzles|GitHub - ajcr/100-pandas-puzzles: 100 data puzzles for pandas, ranging from short and simple to super tricky (60% complete)]] |
| * [[https://github.com/justmarkham/pycon-2019-tutorial|GitHub - justmarkham/pycon-2019-tutorial: Data Science Best Practices with pandas]] |
* [[https://medium.com/@devopslearning/introduction-to-pandas-for-data-analysis-c14bb9b1c21b]] (limité) | * [[https://medium.com/@devopslearning/introduction-to-pandas-for-data-analysis-c14bb9b1c21b]] (limité) |
* [[http://www.firstpythonnotebook.org/index.html|First Python Notebook. A step-by-step guide to analyzing data with Python and the Jupyter Notebook]] (The course will teach you how to use pandas to read, filter, join, group, aggregate and rank structured data. You will also learn how to record, remix and republish your analysis using the Jupyter Notebook) → commencer au chapitre 3 "Import pandas into a Jupyter Notebook" | * [[http://www.firstpythonnotebook.org/index.html|First Python Notebook. A step-by-step guide to analyzing data with Python and the Jupyter Notebook]] (The course will teach you how to use pandas to read, filter, join, group, aggregate and rank structured data. You will also learn how to record, remix and republish your analysis using the Jupyter Notebook) → commencer au chapitre 3 "Import pandas into a Jupyter Notebook" |
* [[https://towardsdatascience.com/learn-how-to-master-groupby-function-in-python-now-4620dd463224|Learn how to master groupby function in Python now | by WY Fok | Towards Data Science]] | * [[https://towardsdatascience.com/learn-how-to-master-groupby-function-in-python-now-4620dd463224|Learn how to master groupby function in Python now | by WY Fok | Towards Data Science]] |
* [[https://towardsdatascience.com/less-known-pandas-groupby-applications-in-python-72fb304a1973|Less known Pandas groupby applications in Python | by WY Fok | Aug, 2020 | Towards Data Science]] | * [[https://towardsdatascience.com/less-known-pandas-groupby-applications-in-python-72fb304a1973|Less known Pandas groupby applications in Python | by WY Fok | Aug, 2020 | Towards Data Science]] |
| * remplacer Excel (ou calc de libreoffice) |
| * [[https://towardsdatascience.com/how-to-ditch-excel-a-primer-to-python-c4a9c192e993|Ditch Excel! — A Primer to Python - Pandas one-liners for popular excel stuff]], Medium 01/09/2020 |
| * [[https://towardsdatascience.com/how-not-to-write-pandas-code-2cbda8b3816c|How NOT to write pandas code]] |
| * [[https://towardsdatascience.com/40-examples-to-master-pandas-c69d058f434e|40 Examples to Master Pandas - A comprehensive practical guide]] |
| * [[https://towardsdatascience.com/pandas-fundamentals-for-beginners-that-will-help-you-code-like-a-pro-2ff5e34fee09|Pandas fundamentals every data scientist needs to know - To boost your performance and code like a pro]] Mısra Turp, Medium, 07/01/2021 |
| * [[https://python.plainenglish.io/add-some-style-to-your-pandas-dataframe-ae3ed4ac7804|Add Some Style to your Pandas DataFrame - Putting Some Pizzaz into your Data]] Curt Beck; Medium, Oct 11, 2020 |
| * [[https://towardsdatascience.com/spreadsheets-to-python-its-time-to-make-the-switch-ef49cf9463d5|Spreadsheets to Python: it's time]] Clive Siviour, Towards Data Science, Medium 03/09/2021 |
| |
| |
==== Datasets ==== | ==== Datasets ==== |
* [[https://archive.ics.uci.edu/ml/datasets/Adult|Adult Data Set]] Predict whether income exceeds $50K/yr based on census data. Also known as "Census Income" dataset | * [[https://archive.ics.uci.edu/ml/datasets/Adult|Adult Data Set]] Predict whether income exceeds $50K/yr based on census data. Also known as "Census Income" dataset |
* [[https://archive.ics.uci.edu/ml/datasets.php]] | * [[https://archive.ics.uci.edu/ml/datasets.php]] |
| * [[https://towardsdatascience.com/7-examples-to-master-line-plots-with-python-seaborn-42d8aaa383a9|7 Examples to Master Line Plots With Python Seaborn - Practical data visualization guide]] Soner Yıldırım, 12/09/2021 → Seaborn + Pandas + librairie [[https://pandas-datareader.readthedocs.io/en/latest/|pandas datareader]] donnant accès à de nombreuses données (bourses, OECD, Eurostat,...) |
| |
| |
==== Exemples divers ==== | ==== Exemples divers ==== |
* [[http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx/notebooks/td2a_eco_regressions_lineaires.html]] | * [[http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx/notebooks/td2a_eco_regressions_lineaires.html]] |
* [[https://towardsdatascience.com/effectively-visualize-data-across-time-to-tell-better-stories-2a2c276e031e|Effectively visualize data across time to tell better stories]] (Pandas & Plotly) | * [[https://towardsdatascience.com/effectively-visualize-data-across-time-to-tell-better-stories-2a2c276e031e|Effectively visualize data across time to tell better stories]] (Pandas & Plotly) |
| * [[https://medium.com/analytics-vidhya/statistical-analysis-in-python-using-pandas-27c6a4209de2|Statistical Analysis in Python using Pandas]] Tanvi Penumudy, Medium, dec 31, 2020 |
| * [[https://towardsdatascience.com/an-ultimate-cheat-sheet-for-data-visualization-in-pandas-f7bc239c9937|An Ultimate Cheat Sheet for Data Visualization in Pandas - All the Basic Types of Visualization That Is Available in Pandas and Some Advanced Visualization That Are Extremely Useful and Time Savers]] Rashida Nasrin Sucky, Medium, 15/02/2021 (dataset, jupyter) |
| |
| |
| |