teaching:progappchim:pandas

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
teaching:progappchim:pandas [2022/03/08 15:15] villersdteaching:progappchim:pandas [2022/11/15 10:08] (Version actuelle) – [Références] villersd
Ligne 52: Ligne 52:
  
 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
Ligne 174: Ligne 175:
 plt.show() 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]]
 +  * [[https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.sort_values.html|pandas.DataFrame.sort_values]] (documentation pandas.pydata.org)
  
 ===== Interface utilisateur graphique ===== ===== Interface utilisateur graphique =====
Ligne 218: Ligne 237:
   * [[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://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   * [[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
 +  * [[https://towardsdatascience.com/efficiently-iterating-over-rows-in-a-pandas-dataframe-7dd5f9992c01|Efficiently iterating over rows in a Pandas DataFrame - Never use iterrows and itertuples again]] Maxime Labonne, Towards Data Science (Medium), 21/03/2022 → l'approche pythonique "list comprehension" fait gagner un facteur énorme par rapport aux codes utilisant les boucles (certaines techniques sont carrément désastreuses), alors que ce n'est pas le cas avec des langages compilés comme C ou Fortran. Pandas étant construit au dessus de NumPy, il n'est  pas étonnant que ses performances peuvent être dépassés par celles de Numpy dans certains cas (x1900 plutôt que x1500 dans cet article par rapport à la plus mauvaise solution).
 +  * [[https://towardsdatascience.com/pandas-df-to-numpy-array-c1a9e7d8585f|How To Convert Pandas DataFrame Into NumPy Array - Converting a pandas DataFrame into a NumPy array]] Giorgos Myrianthous, Medium, 06/05/2022
 +  * [[https://towardsdatascience.com/20-of-pandas-functions-that-data-scientists-use-80-of-the-time-a4ff1b694707|20% of Pandas Functions that Data Scientists Use 80% of the Time - Putting Pareto’s Principle to work on the Pandas library]] Avi Chawla, Medium, 16/05/2022
 +    - Reading a CSV file
 +    - Saving a DataFrame to a CSV file
 +    - Creating a DataFrame from a list of lists
 +    - Creating a DataFrame from a dictionary
 +    - Merging DataFrames
 +    - Sorting a DataFrame
 +    - Concatenating DataFrames
 +    - Rename column name
 +    - Add New Column
 +    - Filter DataFrame based on condition
 +    - Drop Column(s)
 +    - GroupBy
 +    - Unique Values in a column
 +    - Fill NaN values
 +    - Apply Function on a column
 +    - Remove Duplicates
 +    - Value Counts
 +    - Size of a DataFrame
 +  * [[https://towardsdatascience.com/powerful-one-liners-in-pandas-every-data-scientist-should-know-737e721b81b6|Powerful One-liners in Pandas Every Data Scientist Should Know - Things you can do in one line using Pandas]] Avi Chawla, Medium, 12/07/2022
 +  * [[https://medium.com/@shouke.wei/how-to-read-dataset-from-google-drive-with-python-pandas-64bc07bbe35|How to Read Dataset from Google Drive with Python Pandas - Easy and convenient Method to read a dataset from the Google Drive]] Shouke Wei, Medium, 11/11/2022
 + 
  
  
  • teaching/progappchim/pandas.1646748919.txt.gz
  • Dernière modification : 2022/03/08 15:15
  • de villersd