Skip to main content

Load your anki database as a pandas DataFrame with just one line of code!

Project description

Build Status Coveralls Documentation Status Pypi status Gitter License

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ankipandas-0.0.dev3.tar.gz (12.8 kB view hashes)

Uploaded Source

Built Distribution

ankipandas-0.0.dev3-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page