Skip to content

Commit

Permalink
Add guide for reading valid filepaths to readme (#116)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Jonas Weich <[email protected]>
  • Loading branch information
smty2018 and joweich authored Oct 18, 2023
1 parent d27bcb0 commit 370aca8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ parser = WhatsAppParser(FILEPATH)
parser.parse_file()
df = parser.parsed_messages.get_df()
```
**Note:**
Depending on your source system, Python requires to convert the filepath to a raw string.
```python
import os
FILEPATH = r"C:\Users\Username\chat.txt" # Windows
FILEPATH = "/home/username/chat.txt" # Unix
assert os.path.isfile(FILEPATH)

```

## 4. Visualizing
```python
import chatminer.visualizations as vis
Expand Down

0 comments on commit 370aca8

Please sign in to comment.