<jupyter_start><jupyter_text>![Imgur](https://i.imgur.com/5pXzCIu.png) Data Science va Sun'iy Intellekt Praktikum 3-MODUL. MA’LUMOTLARGA ISHLOV BERISH 3.1 Fayllar bilan ishlash  Web fayllar bilan ishlash `read_html()` - web sahifadagi barcha jadvallarni o'qib, `DataFrame1lardan iborat ro'yxat ko'rinishida qaytaradi.<jupyter_code>import pandas as pd
data = pd.read_html("https://en.wikipedia.org/wiki/Tashkent")<jupyter_output><empty_output><jupyter_text>`data` tarkibida sahifadagi barcha jadvallar alohida `DataFrame` ko'rinishida saqlangan. Jadvallar sonini ko'rish uchun `len()` funksiyasiga murojaat qilamiz.<jupyter_code>len(data)<jupyter_output><empty_output><jupyter_text>Yuqoridagi data tarkibida 16 ta DataFrame bor ekan. Alohida DataFramelarga indeks orqali murojaat qilishimiz mumkin.Ba'zida kerakli jadvlani topguncha bir necha indekslarni qarab chiqish talab qilinishi mumkin.<jupyter_code>data[5]
data[7]<jupyter_output><empty_output><jupyter_text>JSON format JSON web orqali ma'lumotlarni uzatishda ishlatiluvchi eng mashhur formatlardan. JSON haqida Dasturlash Asoslari darsimizda batafsil ma'lumot berilgan: https://python.sariq.dev/files-exceptions/34-json<jupyter_code>pd.read_json("universities_ranking.json")
import requests, json
r = requests.get('http://api.nobelprize.org/v1/laureate.json')
data = r.json()
# data['laureates']
pd.DataFrame(data['laureates'],)<jupyter_output><empty_output><jupyter_text>Web APIAPI haqida tushuncha hosil qilish uchun quyidagi 2 videoni ko'rishni tavsiya qilaman:- https://youtu.be/eID-mIzjb-E- https://youtu.be/QoKcBFLd2aE<jupyter_code>r = requests.get("https://openlibrary.org/subjects/python.json?published_in=2015-2021")
pd.DataFrame(r.json()['works'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11353211009174312, 'fraction_numerical': 0.01261467889908257, 'mean_word_length': 7.994845360824742, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '36008', 'license': 'MIT', 'n_tokens_mistral': 747, 'n_tokens_neox': 719, 'n_words': 121, 'path': 'Python/pandas/mohirdev/03-DATAWRANGLE-02-Web.ipynb', 'repo_name': 'YoshlikMedia/Data-Science', 'size': '1744'}