Ayxonov Samariddin tomonidan tayyorlandi


Download 28.48 Kb.
Sana13.05.2023
Hajmi28.48 Kb.
#1456084
Bog'liq
2-amaliy


Ayxonov Samariddin tomonidan tayyorlandi.
[3]
0 сек.
import numpy as np
import pandas as pd
[4]
1 сек.
!git clone https://github.com/Xavfsizlik/dars.git
[5]
0 сек.
df=pd.read_csv("/content/dars/Fifa_world_cup_matches.csv", index_col=0)
df
[2]
7 сек.
! pip install translate
! python setup.py install
from translate import Translator
translator= Translator(to_lang="uz")
[6]
1 сек.
translation = translator.translate("hello")
translation
[7]
1 мин.
arrw=[]
for x in df.columns:
arrw.append(translator.translate(x))
[8]
0 сек.
df.columns=arrw
df
[ ]
len(arrw)
87
[9]
50 сек.
arrq=[]
for x in df["Andoza moslamalar"]:
arrq.append(translator.translate(x))
[10]
0 сек.
df["Andoza moslamalar"]=arrq
df
[11]
51 сек.
arre=[]
for x in df["jamoa 2"]:
s=translator.translate(x)
arre.append(s)
[12]
1 сек.
df["jamoa 2"]=arre
[13]
50 сек.
arrw=[]
for x in df.index:
s=translator.translate(x)
arrw.append(s)
[14]
0 сек.
df.index=arrw
[15]
0 сек.
dfx=df.sort_values('egalik qilish jamoasi1')
dfx
[31]
0 сек.
df["Gollar soni 1"].max()
7
[16]
0 сек.
!git clone https://github.com/Xavfsizlik/dars.git
fatal: destination path 'dars' already exists and is not an empty directory.
[18]
0 сек.
df.info()



Index: 64 entries, Qatar to Argentina
Data columns (total 87 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 jamoa 2 64 non-null object
1 egalik qilish jamoasi1 64 non-null object
2 egalik qilish jamoasi2 64 non-null object
3 musobaqada egalik qilish 64 non-null object
4 Gollar soni 1 64 non-null int64
5 Gollar soni 2 64 non-null int64
6 sana 64 non-null object
7 soat 64 non-null object
8 Andoza moslamalar 64 non-null object
9 jami urinishlar jamoasi1 64 non-null int64
10 jami urinishlar jamoasi2 64 non-null int64
11 o'tkazib yuborilgan jamoa 1 64 non-null int64
12 o'tkazib yuborilgan jamoa 2 64 non-null int64
13 jarima maydonchasi ichidagi gol1 64 non-null int64
14 jarima maydonchasi ichidagi gol2 64 non-null int64
15 jamoaning jarima maydonchasi tashqarisida gol 64 non-null int64
16 2-jarima maydoni tashqarisida gol 64 non-null int64
17 1-jamoaga yordam beradi 64 non-null int64
18 2-jamoaga yordam beradi 64 non-null int64
19 maqsadli urinishlar jamoasi1 bo'yicha 64 non-null int64
20 maqsadli urinishlar jamoasi 2 64 non-null int64
21 maqsaddan tashqari urinishlar jamoasi1 64 non-null int64
22 maqsaddan tashqari urinishlar jamoasi2 64 non-null int64
23 jarima maydonchasi ichida urinishlar jamoasi1 64 non-null int64
24 jarima maydonchasi ichidagi urinishlar2 64 non-null int64
25 jamoaning jarima maydonchasi tashqarisida urinishlari1 64 non-null int64
26 jamoaning jarima maydonchasi tashqarisida urinishlari2 64 non-null int64
27 chap kanal jamoasi1 64 non-null int64
28 chap kanal jamoasi2 64 non-null int64
29 1-kanal jamoasi ichida chap 64 non-null int64
30 2-kanal ichida chap 64 non-null int64
31 markaziy kanal jamoasi1 64 non-null int64
32 markaziy kanal jamoasi2 64 non-null int64
33 o'ng ichida kanal jamoasi1 64 non-null int64
34 2-kanal ichida 64 non-null int64
35 o'ng kanal jamoasi1 64 non-null int64
36 o'ng kanal jamoasi2 64 non-null int64
37 jamoani olish uchun jami takliflar1 64 non-null int64
38 jamoani olish uchun jami takliflar2 64 non-null int64
39 inbehind jamoasi1ni qabul qilishni taklif qiladi 64 non-null int64
40 inbehind jamoasi2ni qabul qilishni taklif qiladi 64 non-null int64
41 jamoani qabul qilishni taklif qiladi 64 non-null int64
42 o'rtasida jamoa2 qabul qilishni taklif qiladi 64 non-null int64
43 Infront jamoani qabul qilishni taklif qiladi1 64 non-null int64
44 Infront jamoani qabul qilishni taklif qiladi2 64 non-null int64
45 yarim himoya va himoya chizig'i jamoasi o'rtasidagi qabullar1 64 non-null int64
46 yarim himoya va himoya chizig'i jamoasi o'rtasidagi qabullar2 64 non-null int64
47 1-sonli chiziqni buzishga urinish 64 non-null int64
48 2-jamoani chiziqni buzishga urinish 64 non-null int64
49 tugallangan qator breaksteam1 64 non-null int64
50 tugallangan qator uzilishlari jamoasi2 64 non-null int64
51 mudofaa chizig'ini buzishga urinish jamoa1 64 non-null int64
52 mudofaa chizig'ini buzishga urinish 2 64 non-null int64
53 yakunlangan mudofaa chizig'i breaksteam1 64 non-null int64
54 tugallangan mudofaa chizig'i 2-jamoani buzadi 64 non-null int64
55 sariq kartochkalar jamoasi 1 64 non-null int64
56 sariq kartochkalar jamoasi 2 64 non-null int64
57 qizil kartochkalar jamoasi 1 64 non-null int64
58 qizil kartochkalar jamoasi 2 64 non-null int64
59 1-jamoaga qarshi qo'pollik 64 non-null int64
60 2-jamoaga qarshi qo'pollik 64 non-null int64
61 ofsaydlar jamoasi1 64 non-null int64
62 ofsaydlar jamoasi2 64 non-null int64
63 1-jamoani o'tkazib yuboradi 64 non-null int64
64 2-jamoani o'tkazib yuboradi 64 non-null int64
65 tugallangan jamoa 1 o'tadi 64 non-null int64
66 tugallangan jamoa 2 o'tadi 64 non-null int64
67 1-jamoani kesib o'tadi 64 non-null int64
68 2-jamoani kesib o'tadi 64 non-null int64
69 yakunlangan jamoani kesib o'tadi1 64 non-null int64
70 yakunlangan jamoa 2 64 non-null int64
71 o'yinning o'zgarishi yakunlangan jamoa1 64 non-null int64
72 o'yin o'zgarishi yakunlandi jamoa2 64 non-null int64
73 burchaklar jamoasi1 64 non-null int64
74 burchaklar jamoasi2 64 non-null int64
75 jarima zarbalari jamoasi1 64 non-null int64
76 erkin zarbalar jamoasi 2 64 non-null int64
77 penaltilar tepgan jamoa1 64 non-null int64
78 2-jamoa penaltilar tepdi 64 non-null int64
79 Maqsadlarning oldini olish guruhi1 64 non-null int64
80 Maqsadlarning oldini olish guruhi 2 64 non-null int64
81 shaxsiy gollar jamoasi1 64 non-null int64
82 shaxsiy gollar jamoasi2 64 non-null int64
83 majburiy aylanmalar jamoasi1 64 non-null int64
84 majburiy aylanmalar jamoasi2 64 non-null int64
85 mudofaa bosimi qo'llanilgan jamoa1 64 non-null int64
86 mudofaa bosimi qo'llaniladigan jamoa2 64 non-null int64
dtypes: int64(80), object(7)
memory usage: 44.0+ KB
[19]
0 сек.
#/content/dars/COVID_Data.csv
dff=pd.read_csv("/content/dars/COVID_Data.csv", index_col=0)
dff
[20]
2 сек.
dfz=pd.read_excel("/content/dars/world_country_gdp_usd.xlsx", index_col=1)
dfz
[21]
0 сек.
dfz.isnull().sum()
Country Name 0
year 0
GDP_USD 3374
GDP_per_capita_USD 3377
dtype: int64
[22]
0 сек.
dfz.head()
dfz.fillna(000)
[23]
0 сек.
dfy=dff.sort_values('Confirmed')
dfy
[36]
0 сек.
hdf1=pd.HDFStore("Covid.h5")
hdf1.put("covid",dfy)
[37]
0 сек.
hdf1['covid']
[34]
0 сек.
hdf2=pd.HDFStore("Snap.h5")
hdf2.put("snap",dfy)
[35]
0 сек.
hdf2["snap"]
[ ]
Colab linki:
https://colab.research.google.com/drive/1o9qOpwfS-7j61kIu2bbijDTRb6xACLu0?usp=sharing

Download 28.48 Kb.

Do'stlaringiz bilan baham:




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