Jump to content

Python

  • entries
    66
  • comments
    0
  • views
    992

Pandas Series(Sütün) Analizi


Doğuhan ELMA

51 views

Bir sütünün değerlerine yönelik analiz yöntemleri:

1-) Bir sütünda kullanılan benzersiz değerler kümesi:

df.cylinders.unique()

Çıktı:

array([8, 4, 6, 3, 5])

 

2-) Benzersiz değerlerin ne kadar tekrarlandığının tablosu:

df.cylinders.value_counts()

Çıktı:

4    199
8    103
6     83
3      4
5      3
Name: cylinders, dtype: int64

 

3-) Grafige dokme:

import pandas as pd

import seaborn as sns
import matplotlib.pyplot as plt

plt.figure(figsize=(10,5))
sns.countplot(x="cylinders",data=df, palette="cubehelix")
plt.show()

Çıktı:

1.png

 

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...