Skip to content

Instantly share code, notes, and snippets.

@kursatyalin
Last active April 29, 2018 10:56
Show Gist options
  • Save kursatyalin/1cc71997a3595db87ea358b91c72f3ba to your computer and use it in GitHub Desktop.
Save kursatyalin/1cc71997a3595db87ea358b91c72f3ba to your computer and use it in GitHub Desktop.
Ortalama alır
# pandas modülünü dahil et ve ismi kodlamada pd olarak geçsin
import pandas as pd
# öğrenci puanları şeklinde bir liste oluştur
öğrenci_puanları = [75,80,70,65]
# listeyi pd modülünü kullanarak seriye çevir
puanlar = pd.Series(öğrenci_puanları)
# pd modülündeki mean fonksiyonu ile puanlar serisininin ortalamasını al
puanlar.mean()
# Çıktı: 72.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment