Skip to content

Commit e82688f

Browse files
Update README and test script
1 parent f8f761e commit e82688f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Construct a `Kattis` object that takes in the username and the password.
1919
```py
2020
from autokattis import Kattis
2121
kt = Kattis('username', 'password')
22+
kt = Kattis('username') # which will then prompts you for the password
2223
```
2324

2425
where `'username'` is your Kattis username/email and `'password'` is your Kattis account password. **Both should be provided as Python strings.**
@@ -60,6 +61,15 @@ kt.ranklist(university='National University of Singapore') # university leaderb
6061
kt.ranklist(university='nus.edu.sg') # use university domain instead
6162
```
6263

64+
### Convert to DataFrame
65+
66+
As simple as this!
67+
68+
```py
69+
kt.problems().to_df()
70+
kt.ranklist().to_df()
71+
```
72+
6373
## Useful References
6474

6575
- Old UI Kattis API wrapper: https://github.com/terror/kattis-api

test/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import pandas as pd
2-
31
from autokattis import Kattis
42
from env import USER, PASSWORD
53

@@ -32,4 +30,4 @@
3230
kt.ranklist(university='nus.edu.sg') # use university domain instead
3331
]:
3432
if ret:
35-
print(pd.DataFrame(ret))
33+
print(ret.to_df())

0 commit comments

Comments
 (0)