Freelance Python Developer
Creating a REST API in Python with Django
Django is a powerful Python Web Framework used to build secure, scalable web applications rapidly with fewer efforts. It became popular because of its low barrier to entry, and strong community that uses and develops the framework. In this guide, we are going to build a RESTful API using Django...
Python: Check if Variable is a Dictionary
Variables act as a container to store data. A developer can use type hints when creating variables or passing arguments, however, that's an optional feature in Python, and many codebases, old and new, are yet to have them. It's more common for a variable in Python to have no information...
Python: How to Add Key to a Dictionary
A dictionary in Python is a collection of items that store data as key-value pairs. We can access and manipulate dictionary items based on their key. Dictionaries are mutable and allow us to add new items to them. The quickest way to add a single item to a dictionary is...
Reading and Writing HTML Tables with Pandas
Hypertext Markup Language (HTML) is the standard markup language for building web pages. We can render tabular data using HTML's <table> element. The Pandas data analysis library provides functions like read_html() and to_html() so we can import and export data to DataFrames. In this article, we...
Reading and Writing XML Files in Python with Pandas
XML (Extensible Markup Language) is a markup language used to store structured data. The Pandas data analysis library provides functions to read/write data for most of the file types. For example, it includes read_csv() and to_csv() for interacting with CSV files. However, Pandas does not include any...
How to Sort a Dictionary by Value in Python
A dictionary in Python is a collection of items that stores data as key-value pairs. In Python 3.7 and later versions, dictionaries are sorted by the order of item insertion. In earlier versions, they were unordered. Let's have a look at how we can sort a dictionary on basis...