About the UTF-8 format in importing data with pandas in python

Open
#185 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
pandas, python
Domain
documentation

Research direction

Start with the linked Pandas lesson section on importing CSV files and review the surrounding learner guidance. Add a concise hint explaining that CSV files from tools such as Microsoft Excel may need to be saved with UTF-8 encoding, and confirm that the guidance is clear for participants using their own files.

Written by the indexing model from the issue text.

Description

This Issue is about this section of a course: https://datacarpentry.org/python-socialsci/08-Pandas/index.html

In detail: When importing a csv-file with this function, it is necessary to ensure, that the csv file is encoded with UTF-8.
Most of the time, when working with csv-files, e.g. with Microsoft Excel, they are stored as a csv, but not UTF-8 compatible.

I had a hard time after my first instructions on how to handle this problem. The solution is fairly simple, but one have to know about: Saving (e.g. with excel) the csv-document and changing ist to te respected type.

I would suggest giving this hint on a course to enable participants in dealing with their own files.

Instructions

Thanks for contributing! ❤️

If this contribution is for instructor training, please email the link to this contribution to
checkout@carpentries.org so we can record your progress. You've completed your contribution
step for instructor checkout by submitting this contribution!

If this issue is about a specific episode within a lesson, please provide its link or filename.

Keep in mind that lesson maintainers are volunteers and it may take them some time to
respond to your contribution. Although not all contributions can be incorporated into the lesson
materials, we appreciate your time and effort to improve the curriculum. If you have any questions
about the lesson maintenance process or would like to volunteer your time as a contribution
reviewer, please contact The Carpentries Team at team@carpentries.org.

You may delete these instructions from your comment.

- The Carpentries

Dominant language
No language data
Stars
37
Forks
70
Avg merge
1m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from datacarpentry/python-socialsci

All issues in datacarpentry/python-socialsci

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.