SlingAcademy

Python

Python: Converting an SQLite database to CSV and vice versa

Updated: Feb 12, 2024

Introduction In this tutorial, we’ll explore how to efficiently convert an SQLite database to a CSV file and vice versa using Python. This process is essential if you’re looking to create backups, manipulate data in......

Python sqlite3: Selecting/Counting Distinct Rows

Updated: Feb 12, 2024

Introduction When working with databases in Python, especially for data analysis, manipulating, and understanding your data is fundamental. The sqlite3 library included with Python provides a lightweight disk-based database, which......

PyMongo: Updating specific array elements with array filters

Updated: Feb 12, 2024

Overview PyMongo provides a powerful and flexible way to interact with MongoDB, including updating specific elements within an array using array filters. This tutorial will guide you through the process of using array filters in......

PyMongo: How to Define and Use Custom Types

Updated: Feb 12, 2024

Overview Working with MongoDB in Python becomes remarkably intuitive with the aid of PyMongo, the official MongoDB Python driver. However, as developers dive deeper, they might find themselves in need of storing and querying data of......

PyMongo: How to check if a collection exists

Updated: Feb 12, 2024

Introduction Working with MongoDB through PyMongo in Python provides a dynamic and powerful way to store, manage, and query data. However, before diving into database operations, it’s crucial to ensure that the specific......

PyMongo error: Date time ‘…’ is not JSON serializable

Updated: Feb 12, 2024

Introduction The PyMongo error, ‘Date time is not JSON serializable’, can occur when attempting to convert MongoDB documents containing DateTime fields to JSON format. MongoDB stores date objects in a format that is not natively......