Load your anki database as a pandas DataFrame with just one line of code!
Project description
Description
With this small python package, you can easily load all of your Anki flashcards as a all-in-one pandas DataFrame!
Pros:
Use all of your mighty pandas tools to data science the heck out of your Anki collection
Just one line of code to get your data frame containing all the information you need
Bring together information about cards, notes and models in just one object! There’s no need to go from cards to corresponding notes to corresponding note model just to find out the field names and contents.
Easy installation (does not depend on any anki installation)
Cons:
This package does not aim to write back to your database (yet)
Installation
AnkiPandas can be installed with the python package manager:
pip3 install ankipandas
For a local installation, you might want to use the --user switch of pip. You can also update your current installation with pip3 install --upgrade ankipandas.
For the latest development version you can also work from a cloned version of this repository:
git clone https://github.com/klieret/ankipandas/
cd ankipandas
pip3 install --user .
Usage
It’s as easy as this:
import ankipandas
ankipandas.load_cards()
And you have a dataframe containing all cards (with all the information from the notes, such as all the fields already added to it).
Take a look at the documentation to find out more about the parameters.
Similarly there are the functions load_notes() (just load notes) and load_reflog() (to load the dataframe that contains information about every review that was ever done). Again, these can be tweaked with parameters, but by default include as much information as possible in one dataframe.
If you want to fine-tweak this, take a look at the core functions, which are slightly more low-level, but allow you to get to your dataframe step by step.
Columns
Get information about the fields in the table:
ankipandas.table_help()
Most of this information is from the ankidroid documentation.
Common problems
Locked database?
License
This software is lienced under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ankipandas-0.0.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b9e6a96db86134013da7a40c34594b178808949517036c0d4d951b16c28465f |
|
MD5 | 38f54d7c26276f2c3db502c346943c0a |
|
BLAKE2b-256 | 0c21dafccfa8370e77bbb8cc190d269ceb84201b1742b02fd7e2d6d8bf14916f |