Professional Documents
Culture Documents
Zhibek Abdikarim - Ipynb - Colaboratory
Zhibek Abdikarim - Ipynb - Colaboratory
ipynb - Colaboratory
#TASK 1,2
with open('Kanye_West.txt', 'r') as file:
txt = file.read()
print(txt)
They mad theyre still nameless Talk that talk man
Her man in the store tryna try his best
But he just cant seem to get Kanye fresh
But we still hood famous God damn
Yeah we still hood famous
I be Puerto Rican day parade floatin
That Benz Marina Del Rey coastin
She in school to be a real estate agent
Last month I helped her with the car payment
Young and we alive whoo
We never gonna die whoo
I just copped a jet to fly over personal debt
Put one up in the sky
The sun is in my eyes whoo
Woke up and felt the vibe whoo
No matter how hard they try whoo
We never gonna die
Hey baby you forgot your Ray Bans
And my sheets still orange from your spray tan
It was more than soft porn for the Kman
She remember my Sprinter said I was in the grape van
Uhm well cutie I like your bougie booty
Come Erykah Badu me well lets make a movie
Hell you know my repertoire is like a wrestler
I show you the ropes connect the dots
A country girl that love Hollywood
Mama used to cook red beans and rice
Now its Dennys in the morning spoil your appetite
Liquor pouring and niggas swarming your section with erection
Smoke in every direction middle finger pedestrians
RB singers and lesbians rappers and managers
Music and iPhone cameras
This shit unanimous for you its damaging for you I think
That pussy should only be holding exclusive rights to me I mean
He flew you in this motherfucker on first class
Even went out his way so you could check in an extra bag
Now you wanna divide the yam like it equate the math
That shit dont add up youre making him mad as fuck
She said she came out here to find an Alist rapper
I said baby spin that round and say the alphabet backwards
Youre dealing with malpractice dont kill a good niggas confidence
Just cause he a nerd and you dont know what a condom is
The head still good though the head still good though
Make me say Nam Myoho Renge Kyo
Make a nigga say big words and act lyrical
Make me get spiritual
Make me believe in miracles Buddhist monks and Capn Crunch cereal
Lord have mercy thou will not hurt me
Five buddies all herded up on a Thursday
Bottle service head service I came in first place
The opportunity the proper top of breast and booty cheek
The pop community I mean these bitches come with union fee
And I want two of these moving units through consumer streets
Then my shoe released she was kicking in gratuity
And yeah G I was all for it
She said K Lamar you kind of dumb to be a poet
Imma put you on game for the lames that dont know theyre a rookie
Instagram is the best way to promote some pussy
Friday night tryna make it into the city
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 1/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
import csv
# Break the loop if the desired number of rows have been printed
if row_count >= num_rows_to_print:
break
import pandas as pd
csv = pd.read_csv('gender_submission.csv')
csv
PassengerId Survived
0 892 0
1 893 1
2 894 0
3 895 0
4 896 1
413 1305 0
414 1306 1
415 1307 0
416 1308 0
417 1309 0
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 2/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
import pickle
#TikTok #russia
2022-05-23
0 1528888293852872704 #refugeecrisis #ukraine Danaya_Pashneya
23:59:09+00:00
#famin...
Ukrainian Presidential
2022-05-23
2 1528888224197660672 Office discloses how knittingknots
23:58:52+00:00
ma...
Alexander Lukashenko
2022-05-23
4 1528888200696975360 reminds me of an i__heart__this
23:58:47+00:00
abused s...
@akshayalladi China
2022-05-22
9996 1528363575844261892 doesn't want to treat 76MuSohlHW1jQ5J
13:14:06+00:00
anyo...
import pandas as pd
Грам
Первый
250 000
магазин был
Продавец- – Пользо
0 ИП Level Алматы Без опыта открыт в
консультант 400 000
2021 году,
₸ Электр
уже в 2...
Наша Кред
75 000 компания дог
ИП Сухоленцев
Кредитный – представляет А
1 Евгений Алматы Без опыта
менеджер 90 000 собой р
Александрович
₽ выдающуюся Н
ко...
Обязанности:
Инженер- от /n /n Solid
ТОО Жетысу
2 проектировщик/ 400 000 Алматы Без опыта /nРазработка
Контактор
конструктор ₸ чертежей Техни
дет... докуме
Мы команда П
350 000
“Asnelles” - привле
М
# pandas provides the read_sas() function, which allows us to read SAS datasets directly into a DataFrame.
sas = pd.read_sas('airline.sas7bdat')
sas
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 3/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
YEAR Y W R L K
# Using Pandas' read_stata() function to read Stata datasets directly into a DataFrame
data = pd.read_stata('CEO Dismissal Dataset 31Jan23.dta')
# Displaying the first few rows of the DataFrame using the head() function to inspect the data
data.head()
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 4/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
ADC
W
2 4 TELECOMMUNICATIONS 1013 2000 2611
INC
ADC
R
3 5 TELECOMMUNICATIONS 1013 2003 23275
INC
ADC
4 6 TELECOMMUNICATIONS 1013 2010 8741 Rober
INC
import pandas as pd
file = pd.read_json('iris.json')
file.head()
Collecting pdfplumber
Obtaining dependency information for pdfplumber from https://files.pythonhosted.org/packages/53/5c/4523bfce8ba473b0e33
Downloading pdfplumber-0.10.4-py3-none-any.whl.metadata (39 kB)
Collecting pdfminer.six==20221105 (from pdfplumber)
Downloading pdfminer.six-20221105-py3-none-any.whl (5.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 5.6 MB/s eta 0:00:0000:0100:01
Requirement already satisfied: Pillow>=9.1 in ./anaconda3/lib/python3.11/site-packages (from pdfplumber) (9.4.0)
Collecting pypdfium2>=4.18.0 (from pdfplumber)
Obtaining dependency information for pypdfium2>=4.18.0 from https://files.pythonhosted.org/packages/db/12/47a850cd8cc3
Downloading pypdfium2-4.27.0-py3-none-macosx_11_0_arm64.whl.metadata (48 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.1/48.1 kB 3.1 MB/s eta 0:00:00
Requirement already satisfied: charset-normalizer>=2.0.0 in ./anaconda3/lib/python3.11/site-packages (from pdfminer.six=
Requirement already satisfied: cryptography>=36.0.0 in ./anaconda3/lib/python3.11/site-packages (from pdfminer.six==2022
Requirement already satisfied: cffi>=1.12 in ./anaconda3/lib/python3.11/site-packages (from cryptography>=36.0.0->pdfmin
Requirement already satisfied: pycparser in ./anaconda3/lib/python3.11/site-packages (from cffi>=1.12->cryptography>=36.
Downloading pdfplumber-0.10.4-py3-none-any.whl (54 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.7/54.7 kB 3.5 MB/s eta 0:00:00
Downloading pypdfium2-4.27.0-py3-none-macosx_11_0_arm64.whl (2.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 6.2 MB/s eta 0:00:0000:0100:01
Installing collected packages: pypdfium2, pdfminer.six, pdfplumber
Successfully installed pdfminer.six-20221105 pdfplumber-0.10.4 pypdfium2-4.27.0
Note: you may need to restart the kernel to use updated packages.
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 5/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
import pdfplumber
# It provides better support for complex PDF structures, such as tables, and can handle encrypted PDFs more effectively.
with pdfplumber.open('Harry Potter - Book 1 - The Sorcerers Stone.pdf') as pdf:
# Loop through all the pages
for page in pdf.pages:
# Extract text from the page
text = page.extract_text()
import numpy as np
['She got one of your kids got you for eighteen years'
'I know somebody paying child support for one of his kids'
'His baby mama car and crib is bigger than his' ...
'But you know people gon be talking bout us weekly'
'My car be in a Robb Report but whats more important to me' 'Is that you']
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 6/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
import numpy as np
# **np.genfromtxt:**
# * Offers greater flexibility in handling header rows and specifying data types.
# * Allows for more graceful exclusion of non-numeric data through converters or skipping rows.
# * Suitable for complex data files with varying formats and data types.
# **np.loadtxt:**
# Choose the function based on your data file characteristics and processing needs.
#Task 4
Unnamed: 8
0 NaN
1 NaN
2 NaN
3 Done
4 In process
Sheet Title: Practical Tasks
Unnamed: 0 Unnamed: 1 Unnamed: 2 Unnamed: 3 Unnamed: 4 Unnamed: 5 \
0 MAT 344 NaN NaN NaN NaN NaN
1 NaN NaN NaN NaN NaN NaN
2 NaN NaN NaN NaN NaN NaN
3 NaN NaN Lecture 1 NaN NaN Lecture 2
4 NaN NaN pp.291 D R pp.305-307
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 7/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
Unnamed: 6 Unnamed: 7 Unnamed: 8 Unnamed: 9 ... Unnamed: 16 Unnamed: 17 \
0 NaN NaN NaN NaN ... NaN NaN
1 NaN NaN NaN NaN ... NaN NaN
2 NaN NaN NaN NaN ... NaN NaN
3 NaN NaN Lecture 3 NaN ... Lecture 7 Lecture 8
4 D R pp.312 D ... NaN NaN
Unnamed: 24 Unnamed: 25
0 NaN NaN
1 NaN NaN
2 NaN NaN
3 Lecture 15 Total gathered points
4 NaN NaN
[5 rows x 26 columns]
#Task 5
import pandas as pd
Information Spreadsheet:
Unnamed: Unnamed: Unnamed: Unnamed: Unnamed: Unnamed: Unnamed: Unna
0 1 2 3 4 5 6
Extra
Points by
working Mid/EndTerm Final
2 NaN NaN Quizes NaN
on Exams Exam
practical
hours
Final
18 NaN NaN NaN NaN 0.4 NaN
Week
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 8/9
14.02.2024, 22:08 Zhibek Abdikarim.ipynb - Colaboratory
pp.305-
4 NaN NaN pp.291 D R D
307
Abdikarim
5 1 10 NaN NaN 2 NaN
Jibek
Ainabek
7 3 8 0.4 NaN 4 NaN
Gulnaz
Akhynov
8 4 7 NaN NaN 5 NaN
Temirlan
Amanzhol
9 5 6 0.2 NaN 6 NaN
Seriktes
Anuarbekov
10 6 5 0.2 NaN 7 NaN
Adlet
Assylbekova
11 7 4 0.5 NaN 8 NaN
Ayaulym
Kanatbekov
12 8 3 0.5 NaN 9 NaN
Iliyas
Konakbayeva
13 9 10 0.5 NaN 10 NaN
Altynai
Muratova
14 10 9 NaN NaN 11 NaN
Sabina
Neftullaeva
15 11 8 NaN NaN 12 NaN
Narmilya
Shaulanbekov
18 14 5 0.2 NaN 15 NaN
Abdukadyr
Torebek
19 15 4 0.5 NaN 2 NaN
Yerassyl
Tursynbek
20 16 3 N N N N 3 N N
https://colab.research.google.com/drive/19s6tjI_p2gdUi2HkcaftRmktWpnSB9Me#printMode=true 9/9