pandas paketi Pandas – bu Python dasturlash tilining ma’lumotlarni qayta ishlash va tahlil qilish kutubxonasi 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)
https://www.geeksforgeeks.org/how-to-get-column-names-in-pandas-dataframe/
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
Do'stlaringiz bilan baham: |