Created
September 25, 2017 19:51
-
-
Save jazzyjackson/11b1f6c8158067f9a1178a4679ea1b4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## For Python 2 | |
# import codecs | |
# from future.utils.surrogateescape import register_surrogateescape | |
# register_surrogateescape() | |
## Python 2 doesn't have an errors parameter in its global 'open' method, so, import codecs and use codecs.open | |
# with codecs.open('./youtube_quils_results.csv','r', encoding="utf-8", errors="surrogateescape") as the_file: | |
with open('./youtube_quils_results.csv','r', encoding="utf-8", errors="surrogateescape") as the_file: | |
original = pandas.read_csv(the_file, iterator=True, encoding="utf-8") | |
unsafe_set = set(pandas.read_csv('unsafe_list.csv', header=None, squeeze=True)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment