When working with Excel files, it is often necessary to update data and adjust graphs accordingly. In this article, we achieve this goal using the widely-used openpyxl library. During this process, we encountered several issues and their corresponding solutions.
This post will demo 3 Ways to save pandas data. - download as a csv file. - save as a csv file to Google drive. - save as a Google spreadsheet to Google drive.
In this article, I want to introduce a powerful service, 'Google collaboratory'(or 'Google Colab' for short). And some useful tips to use it.
In this article, I will show you how to execute HTTP requests with urllib.request. The workflow is, 1. Create a request by `urllib.request.Request` method. 2. Assign the request as a parameter of `urllib.request.urlopen` method to get response. 3. use `json` module to parse the response.
Here will show you about pyenv installation and usage. - Use **Homebrew** to install **pyenv**. - Use pyenv install --list to check the list. - Use pyenv versions to check if the specific version of python is installed or not. - Use pyenv global <version> or pyenv local <version> to switch version of python.
Here are 4 points are used to reorganized files in folder by file type. 1. use `os.path.isdir()` function to check if the folder exists or not. 2. use `os.listdir()` function to get the file list in the folder. 3. use `os.path.splitext()` funciton to get file's extension. 4. use `shutil.copyfile()` to copy the file to target path.
The **DataFrame** of **pandas** is a very common object used in doing data analysis. This article introduces four common ways (**NumPy**, **dist**, **list**, **csv file**) to build a DataFrame.