August 2016
Beginner to intermediate
717 pages
15h 24m
English
Another popular format to store tabular data is an Excel spread sheet. In this recipe, we will import movies from a file of this format.
Let's start with the movies app that we created in the previous recipe. Install the xlrd package to read Excel files, as follows:
(project_env)$ pip install xlrd
Follow these steps to create and use a management command that imports movies from a local XLS file:
movies app, create a management directory and then a commands directory in the new management directory. Put the empty __init__.py files in both the new directories to make them Python packages.import_movies_from_xls.py file with the following content: ...Read now
Unlock full access