The Variable Explorer allows you to browse and manage the objects generated by running your code interactively.Continue reading
This article focuses on how to remove seconds on Python datetime objects. The seconds can be removed in two ways – simply truncating seconds by turning them to 0 or by rounding off seconds into minutes.Continue reading
Python’s built-in bytearray function allows us to convert arrays to byte arrays. Because an image is just an array of numbers, we will leverage this method to convert images into a byte array.Continue reading
This error occurs when Python expects an indented block and doesn’t find it. For example:Continue reading
The venv module comes pre-installed in Python 3.3 and later. If the module is not installed, then you will run into ModuleNotFoundError: No module named ‘venv’ when you try importing the module on the script (by running “import venv“) or on the terminal/command line when you run “python -m venv <env_name>“.Continue reading
Python provides capabilities to read CSV data directly from the web. This post will show how to load CSV in three ways-: using pandas, urllib, and requests packages in python.Continue reading
The webbrowser module, which comes preinstalled with Python, is a library that can be used to control web browsers. This article will show how this module can be used to open tabs and windows on installed browsers. You will get to choose the browser to use, whether to open the URL you want to visit on a new window or not and whether to open a new tab.Continue reading
This article discusses how to count lines in all the files in all the folders inside the root directory of our interest. Here is a look at the directory structure we will use to test our code.Continue reading
Pandas and csv libraries are popular names when handling CSV files. Python comes pre-installed with csv, but for pandas, you must install it before using it.Continue reading
- (Caution Note) Linux – It might not be safe to uninstall Python. Follow the instructions keenly.
- Windows – It is safe to uninstall Python completely, provided it is done correctly.