Solve the Japanese problem when using the CSV module in Python.

How to solve it when Python's CSV module is so poor that it stumbles.

f = open("data.csv", "ab")
writer = csv.writer(f, quoting=csv.QUOTE_NONE)

Save to CSV without quotes.

f = codecs.open("data.csv", "r", "utf-8")
   for line in f:			
   line = line.rstrip()
   l = line.split(",")
   hoge = l[0]

   print hoge

I managed to solve it.

Recommended Posts

Solve the Japanese problem when using the CSV module in Python.
Solve the maximum subarray problem in Python
Character encoding when using csv module of python 2.7.3
Initial settings when using the foursquare API in python
Precautions when using pit in Python
Try using the Python Cmd module
When using regular expressions in Python
Master the weakref module in Python
Solve the subset sum problem with a full search in Python
Try using the Wunderlist API in Python
Try using the Kraken API in Python
Comparison of Japanese conversion module in Python3
Tweet using the Twitter API in Python
Install the Python module in any directory
Csv in python
Create a record with attachments in KINTONE using the Python requests module
Search for synonyms from the word list (csv) using Python Japanese WordNet
Notify using Notification Center when the execution environment is macOS in Python
A useful note when using Python for the first time in a while
Try to solve the Python class inheritance problem
Solve the knapsack problem using pyomo and glpk
[Python] Let's execute the module regularly using schedule
The first step in the constraint satisfaction problem in Python
Try using the BitFlyer Ligntning API in Python
I tried using the Datetime module by Python
Pre-process the index in Python using Solr's ScriptUpdateProcessor
Try using the collections module (ChainMap) of python3
The 19th offline real-time writing problem in Python
Solve simultaneous equations in an instant using Python
Try using the DropBox Core API in Python
I stumbled on the character code when converting CSV to JSON in Python
Solve ABC168D in Python
Solve ABC167-D in Python
Solve ABC146-C in Python
Solve ABC098-C in Python
Solve ABC169 in Python
Japanese output in Python
Solve ABC160-E in Python
Basic information Write the 2018 fall algorithm problem in Python
[AWS IoT] Register things in AWS IoT using the AWS IoT Python SDK
Collectively register data in Firestore using csv file in Python
Try to solve the internship assignment problem with Python
[python] Get the list of classes defined in the module
Determine the threshold using the P tile method in python
Write data to KINTONE using the Python requests module
How to exit when using Python in Terminal (Mac)
I tried to solve the problem with Python Vol.1
Japanese output when dealing with python in visual studio
Solve the one-stroke writing (backtrack without recursion in Python)
Using the National Diet Library Search API in Python
Using the LibreOffice app in Python (1) Where are the macros?
I checked the reference speed when using python list, dictionary, and set type in.
A story that was convenient when I tried using the python ip address module
I wrote python in Japanese
[Python] Open the csv file in the folder specified by pandas
Download the file in Python
Find the difference in Python
About the Python module venv
View using the python module of Nifty Cloud mobile backend
Solve ABC176 E in Python
When reading an image with SimpleITK, there is a problem if there is Japanese in the path