txt is the conventional filename extension of text files.
Questions tagged [txt]
1467 questions
1
vote
1 answer
How do I convert one column of a csv file to a txt file in Python?
I have a specific column in a csv file and I want to write each row of that column as a newline in the same txt file. I'm using Panda if that helps. I can't quite figure out how to iterate over the rows of one specific column.

Lorenzo Palacio
- 45
- 5
1
vote
1 answer
Copy/Filter/Paste to TXT File- Remove Excel Filter
I am trying to filter a tab in excel for non blank cells, copy those cells, and paste the copied data in a txt file. I then need the filter applied on the tab in excel to be removed. When I try to input the clear sub in the TEST sub, the copy and…

arisophia
- 61
- 4
1
vote
1 answer
unexpected '\r' carriage return from np.loadtxt
I am reading a .dat file using the following command
accel_x = np.loadtxt('./GroundMotions/GM/%s_%s_%s_%s_x.dat' % (station, realization, soilpro, profile))
where station, realization, soilpro, and profile are all Strings.
Then python throws me an…

Kevin
- 39
- 6
1
vote
3 answers
Find specific values in a txt file and adding them up with python
I have a txt file which looks like that:
[Chapter.Title1]
Irrevelent=90 B
Volt=0.10 ienl
Watt=2 W
Ampere=3 A
Irrevelent=91 C
[Chapter.Title2]
Irrevelent=999
Irrevelent=999
[Chapter.Title3]
Irrevelent=92 B
Volt=0.20 ienl
Watt=5 W
Ampere=6 A…

GeSie
- 9
- 4
1
vote
1 answer
Very long line in VIM does not show up without having the cursor on it
I'm using VIM version 8.2
When I'm on the line above the very long line, it appears as if there is no line below it. (Refer Below Image)
But as soon as I move down, I get to see everything in that line. (Refer Below Image)
Is there a way to make…

Premnaath Varadharajan
- 61
- 1
- 6
1
vote
3 answers
Convert a txt document to a list to a list starting with [[, instead of ['[
I have a .txt document with this type of text:
[(“Vazhdo”,”verb”),(“të”,”particle”),(“ecësh”,”verb”),(“!”,”excl.”)]
(which represents a sentence and the Parts of Speech tags for each word)
I want to have a list of list in python, like…

Kena
- 43
- 6
1
vote
2 answers
Pandas: How to merge all rows into a single row?
I have the following dataframe:
text
1 "abc"
2 "def"
3 "ghi"
4 "jkl"
How can I merge these rows into a dataframe with a single row like the following one?
text
1 "abc, def, ghi, jkl"
Comma separation is not a must but all the values…

Daniel
- 400
- 2
- 10
1
vote
1 answer
How to save all the output from a .ipynb file as a txt file?
I have a few .ipynb notebooks with similar outputs (time series data). I want to export all the outputs from all the notebooks to a .txt file. If that is complicated to do, then one txt file for each of the notebooks is fine too.

schakraborty
- 13
- 3
1
vote
4 answers
How to remove dash/ hyphen from each line in .txt file
I wrote a little program to turn pages from book scans to a .txt file. On some lines, words are moved to another line. I wonder if this is any way to remove the dashes and merge them with the syllables in the line below?
E.g.:
effects on the skin is…

Student111
- 49
- 4
1
vote
1 answer
Importing txt file in R --- Why does # symbol in variable names cause problems?
I am trying to import some .txt data into R using the read.table function. The actual dataset I have is large and complicated, so I will use a small reproducible example here which shows the kind of problem I'm having. To illustrate the problem,…

Ben
- 1,051
- 8
- 26
1
vote
1 answer
Import pipe delimited txt file into spark dataframe in databricks
I have a data file saved as .txt format which has a header row at the top, and is pipe delimited. I am working in databricks, and am needing to create a spark dataframe of this data, with all columns read in as StringType(), the headers defined by…

Tori Olphin
- 13
- 4
1
vote
1 answer
How to remove a .txt list of passwords from another .txt list of passwords?
I have a 164gb passwords list and a rockyou.txt list, and I'd like to remove all rockyou passwords from the 164gb list. Any way to do this? I've researched it a bit, and I haven't found a way to do it with such a large file.

Quinn
- 11
- 1
1
vote
5 answers
Read file with decimals as comma not working in R cordinates?
I have received a field with XY coordinates that have a decimal as a comma, but I cannot correctly open this file in R.
Here is how my data should look like - note comma as decimal indicator in y…

maycca
- 3,848
- 5
- 36
- 67
1
vote
1 answer
Searching for float value in .txt file
I have a program that saves a .txt log with multiple values and text. Those are time values can differ each time the program is ran, but their place in this .txt file is always the same. I need to grab those values and check if they are smaller than…

Redal_Snake
- 57
- 6
1
vote
1 answer
VBA : Problem opening .csv or .txt files placed in SharePoint from Excel file saved on local
I'm trying to access a .csv file stored in my company's sharepoint from a VBA function in an Excel file stored on my laptop locally:
FilePath = "https://[company].sharepoint.com/Shared%20Documents/[folder]/testCSV.csv"
Open FilePath For Input As…

cafu23
- 17
- 5