JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
about 1 month ago1 views
👨‍💻Programming
import pandas as pd
data={"Produit":["PC","Souris","Clavier","Ecran"],
      "Prix":[1500,20,30,300],
      "Quantité":[10,50,40,20]}
df=pd.DataFrame(data)
df.head(3)
df["Chiffre_Affaire"] = df["Prix"] * df["Quantite"]
print(df)
df[df["Chiffre_Affaire"] > 1000]
ca_total = df["Chiffre_Affaire"].sum()
print(ca_total)
df_sorted = df.sort_values(by="Chiffre_Affaire", ascending=False)
print(df_sorted)
← Back to timeline