iloc function in python

mustafacam

Mustafa Çam

Posted on July 5, 2023

iloc function in python
import pandas as pd

# Örnek bir veri çerçevesi oluşturalım
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6], 'C': [7, 8, 9]})

# select the first line
ilk_satir = df.iloc[0]
print(ilk_satir)
Enter fullscreen mode Exit fullscreen mode
çıktı =>

A    1
B    4
C    7
Enter fullscreen mode Exit fullscreen mode

yani burda iloc foksiyonumuz veri çerçevesindeki elemanlar üzerinde işlem gerçekleştiriyor pandas kütüphanemizi kullanarak

💖 💪 🙅 🚩
mustafacam
Mustafa Çam

Posted on July 5, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

.fit() LinearReggression
python .fit() LinearReggression

July 7, 2023

iloc function in python
python iloc function in python

July 5, 2023

Appending Rows to a Pandas DataFrame
python Appending Rows to a Pandas DataFrame

October 29, 2022

Data Manipulation in Python using Pandas
datascience Data Manipulation in Python using Pandas

February 13, 2021