Skip to main content

All Questions

Tagged with
0 votes
1 answer
46 views

How can I parse this proprietary text file into CSV with maybe regex and/or Python?

I have been given a config file from an old proprietary system that I want to parse into a CSV so I can import it into a SharePoint List or an Excel file, and access it with either Power BI or Power ...
Griffin W's user avatar
-1 votes
4 answers
348 views

C++ Parsing text and writing to a csv file

**My friend sent me this and I couldn't find a way to do it. ** There are million things I've tried with AI but no hope. I would be really appreciated if someone helped me with this. It has to be C++ ...
Athos's user avatar
  • 1
1 vote
1 answer
70 views

Iterating through a folder and converting all text files to csv files Error

I ran a Powershell code that outputted a bunch of text files. The text files look like this: This is my aText.txt Clark Kent Dolly Parten Charlie Brown Gary Numan It's just text files ...
noobCoder's user avatar
  • 105
0 votes
0 answers
49 views

My txt to CSV code drops everything into one column

I've tried so many different approaches and I cannot figure out how to get my code to work so that my text > CSV conversion has the data separated into same structure as the text file. Everything ...
ktnak33's user avatar
0 votes
1 answer
63 views

Python pandas read file with delimiters inside the data?

I regularly have to read text files as such: Column1; Column2; Column3 data1;dat;a2;data3 Meaning that the data in Column 2 uses the same character used as the delimiter, therefore pandas ...
PJ_'s user avatar
  • 563
0 votes
0 answers
31 views

CSV file doesnt recognize text symbols

I download a csv file online. However, when I open it, it does not recognize all the symbols, making it difficult to read. See below example of how it shows the text and next to it how it should have ...
T.Joost's user avatar
0 votes
0 answers
46 views

Why am i getting Traceback error on csv to text script which i used a python script that work on other work stations

I am getting the error below when I run the script. It works fine on a workstation. I am pretty new with python. What could be the problem? I am trying to convert all csv files in that directory to ...
yawdeals's user avatar
-1 votes
1 answer
36 views

pandas read textfile as dataframe

I have a textfile with hundreds of rows where each row looks like the following: "LastName, FirstName MiddleName", 222555,X-150,2023,0.15,0.20,0.5,"1, 2, 10",--,1.5,5.10,report ...
DPdl's user avatar
  • 735
0 votes
1 answer
50 views

How to replace all characters before and after specific place in text in Python

I have a csv file with delimiter in text column. The number of delimiter in text column is different from row to row. Example of csv data (delimiter is '_'): ID_GROUP_TEXT_DATE_PART 101_group_1_Some ...
Andrey's user avatar
  • 25
0 votes
2 answers
114 views

Text file to CSV conversion with columns

I have a text file with the following structure. The first line is the heading and the next line defines the two (nm and sigma) column names. How can I convert this to csv files and save them? ...
Mod_x's user avatar
  • 21
0 votes
1 answer
40 views

How to split readLines output into text array R

I am using readLines to read the first 4 lines of csv files to determine what the headers are so I can concatenate files with similar headers. readLines produces difficult output that looks like this ...
user8229029's user avatar
  • 1,056
0 votes
2 answers
140 views

Handling `CRLF` line endings in substitution and `split` in Perl

I need to process many files (with CRLF line endings) that look like that: $ cat -v file1.txt 1$XXX$ZZZ$$$$$$$$^M 2$AAA$BBB$$$$$$$$^M $ cat -v file2.txt 1$4668$$$^M 2$46$$$^M I need to: remove the ...
Thomas's user avatar
  • 491
1 vote
4 answers
452 views

How to split a large CSV file conditionally in Windows or Linux?

I have a CSV file that's way too large for Excel and I'd like to split it into smaller files. I already found a way to do this here, and it even preserves the header row which is great. However, I ...
bugnumber9's user avatar
-1 votes
2 answers
613 views

MacOS - Combine multiple text files into one spreadsheet with one file per a column?

Using MacOS terminal, is there away to take a directory of text files and have them all combined into one spreadsheet (either CSV or Numbers format) so: Every file is in a separate column Every line ...
big_smile's user avatar
  • 1,513
0 votes
2 answers
461 views

Using powershell to read text files, Edit a Column before outputting each text file to a CSV

I've got a batch of text files that need to be converted to csv files. However, once I open the csv file, the data in a column has been converted to scientific notation. I want to prevent this by ...
InquisitorLu's user avatar

15 30 50 per page
1
2 3 4 5
37