Python dasturlash tili. Python dasturlash tili


pandas paketi Pandas – bu Python dasturlash tilining ma’lumotlarni qayta ishlash va tahlil qilish kutubxonasi


Download 0.58 Mb.
bet5/5
Sana15.03.2023
Hajmi0.58 Mb.
#1268723
1   2   3   4   5
Bog'liq
Python dasturlash tili

pandas paketi

Pandas – bu Python dasturlash tilining ma’lumotlarni qayta ishlash va tahlil qilish kutubxonasi

Pandasni o’rnatish: pip install pandas

Pandas paketining read_csv() funksiyasidan foydalanib .csv fayldagi ma’lumotlarni o’qib olish mumkin.

  • import pandas as pd
  • df = pd.read_csv ('file_name.csv')
  • print(df)

Pandas dataframe


https://www.geeksforgeeks.org/how-to-get-column-names-in-pandas-dataframe/

Pandas read_csv() imkoniyatlari


df.read_csv('file_name.csv’) df.read_csv('C:/Users/abc/Desktop/file_name.csv') df.read_csv('file_name.csv’, header=None) pd.read_csv('file_name.csv',sep='\t') pd.read_csv('file_name.csv',index_col='Name')
https://towardsdatascience.com/how-to-read-csv-file-using-pandas-ab1f5e7e7b58

Numpy paketi (reshape)


import numpy as np arr =
np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
newarr = arr.reshape(2, 3, 2) print(newarr)
import numpy as np arr =
np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
newarr = arr.reshape(4, 3)
print(newarr)
https://www.tutorialspoint.com/numpy/numpy_matrix_library.htm
Download 0.58 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling