DEV Community

Amzar
Amzar

Posted on

What Python libraries should I learn? [2023 UPDATED]

Python is one of the most popular programming languages mentioned by Coursera. As you know, Python can do anything from development to statistical analyses, and also, many standard libraries are provided.

Popular Python libraries for Starter

Here is my recommendation of Python libraries that starter should know.

1. os

Let say you want to interact with operating system by code, os help a lot. You can list of the directory and also rename, delete or anything by the code.

import os

os.getcwd() # get current directory
os.listdir() # list current directory
os.listdir('/Users/mohamadamzar/code') # list specific directory
os.rename(old_filename, new_filename) # rename file
Enter fullscreen mode Exit fullscreen mode

2. requests

You can use requests to interact with the API. It provide REST API method such as GET, POST, PUT and DELETE. If you are into the development, must know how to use the library.

3. BeautifulSoup

You can do data extraction (HTML and XML) easily by using BeautifulSoup. It parses the data with beautiful formatting; you can extract it by tag and div. You don't need to worry about the complicated tag; it can be solved using the library. Javascript? It will only be workable with simple Javascript 😉

4. cv2/opencv

Interesting library to try. It can interact with the image; read and display the image, turn it to greyscale, save the image from the link, create a circle in the image, and many more.

import cv2
img = cv2.imread('range-rover.png', cv2.IMREAD_COLOR)
Enter fullscreen mode Exit fullscreen mode

5. pandas

Pandas is a library to interact with multiple data sources. You not only can read the data, but you can analyze and manipulate the data. For the data analyst, it can be used for data wrangling and cleaning. Also, you can explore the simple ETL using pandas.


There's a lot more to explore; I will update the post from time to time!

Top comments (0)