I want to store only numerical data of csv file (Unicode) output by other software in the list.
Please tell me how to program.
The data is as follows. Numeric data seems to be separated by tabs and spaces.
I would like to be able to store these X and Y coordinates as lists.
X coordinate Y coordinate
-2.605988E + 00 5.895555E-07
-2.595808E + 00 5.896124E-07
-2.585628E + 00 5.897834E-07
Answer # 1
Maybe it should be read using
import pandas as pd df = pd.read_csv ('data.csv', sep = '\ s +') x = df.iloc [:, 0] .values.tolist () y = df.iloc [:, 1] .values.tolist ()
Answer # 2
The problem was solved by changing the original output file format.
Thank you for your response.
Answer # 3
I'm sorry if it was solved.
I'm looking at the conversation with Magi-chan. Does the following code pass?
with open ("data.csv", encoding = "utf8") as file: for line in file.readlines (): print (line.rstrip ())
- python - how to process csv data 12b and 567m
- python - how to read/write csv file on windows
- how to import python
- python - how to process scraped data
- post json data in python and receive json data
- array - how to retrieve json data
- python - to eliminate the error display of import pgzrun in pygame zero
- python csv writing
- output of python csv
- ruby - how to extract some data from db (database)
- how to send arbitrary data to another page php
- read csv with python and output new
- website - i don't know how to import requirementstxt
- python - how can i make the tic-tac-toe that i made easier?
- python 3x - i want to save the data read in rgb as npy
- python voice data
- python - time-series data with missing or missing time
- python - why you can import abstractbaseuser from both djangocontribauthmodels and djangocontribauthbase_user in django
- python - in the list data, i want to get the same hourly total for each day
- python - i have a question for data scientists
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved