Comments (7)
Hi @CaptainDario, I think the field you're looking for is called cdeck
:) All columns of the "cards" table are prefixed with c
. Let me know if this works!
from ankipandas.
Ah, I just saw that the old closed issue references deck
instead of cdeck
(probably and earlier version of AnkiPandas). I'll add a note there, thanks for making me aware of this.
Thanks btw for providing such a complete issue report including all the logs and code and link :)
from ankipandas.
@klieret Thank you for your help!
With cdeck I can now iterate over all cards from a test-deck.
I added:
for cnt in range(t.shape[0]):
print(t.iloc[cnt][19])
to print the back and front of a basic
note (I guess there is a prettier way to do that...).
However I have problems accessing a nested deck.
The deck I want to access is nested like this:
"Sprachen" -> "Japanisch" -> "Japanisch Vokabeln"
when I try:
t = cards.query("cdeck == 'Japanisch Vokabeln'")
or
t = cards.query("cdeck == 'Sprachen::Japanisch::Japanisch Vokabeln'")
I get an empty deck.
What is the correct notation to access a nested deck?
from ankipandas.
Can you just check cards["cdeck"].unique()
before the query? This should print all available deck names, so you'll probably find yours there.
I can also recommend you to simply do a pandas
tutorial, this will probably help you a lot with these things :) (also for finding your way with accessing the content of the tables).
from ankipandas.
I can also highly recommend to run AnkiPandas
in a Jupyter notebook. This will give you a graphical representation of the tables and lets you play around with it much more interactively
from ankipandas.
Thank you, a Pandas tutorial is overdue thats true...
I just read a little bit about pandas and could finally figure out how to get all notes from a deck. The separator for nested decks is \x1f
.
This is just a small side project for one or two days, so thank you for saving my time budget with this very nice library!
from ankipandas.
That's good to know with the \x1f
separator! I'll see if I add some documentation for that!
Good luck with your side project, don't hesitate if there are more questions :)
from ankipandas.
Related Issues (20)
- How to get the history of reviews of a card/deck? HOT 3
- Document different tables and their content
- [request] need read only access to locked database HOT 5
- How to get the creation date of a card? HOT 2
- Accessing deck settings HOT 9
- Update doesn't work ? What is the correct way of updating single notes ? HOT 11
- Future warning about `Index.__and__`
- Harden interface by marking arguments as keyword-only
- Missing database indices HOT 5
- Columns in documentation HOT 3
- Thank you and similarity scanner I made with it. HOT 4
- Writing to collection breaks synchronization and editing in Ankidroid HOT 13
- is it possible to read an anki portable base? HOT 1
- Incompatibilities with pandas 2.0 HOT 1
- sub- and superdeck support HOT 6
- Problems when adding a note HOT 2
- "Ankipandas Conversion Issue: Erroneous Update Messages in Anki Database Export"
- API docs don't show up properly
- Support opening apkg files out of the box HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ankipandas.