Questions tagged [txt]

txt is the conventional filename extension of text files.

1467 questions
-1
votes
1 answer

Convert text file data into a dataframe

I have a dataset like this, a .txt file للہ عمران خان کو ہماری بھی عمر لگائے ہم جیسے تو اس ملک میں اور بھی پچیس کروڑ ہیں مگر خان آپ جیسا تو یہاں دوسرا نہیں ۔۔۔ اللہ آپکی حفاظت فرمائے آمین [Real,politics,sarcasm ,rise moral] how can I convert into…
-1
votes
1 answer

Convert RDF files into TXT?

Any ideas about software or methods to convert RDF into TXT? I have many different file into rdf format and I am looking for a converter? All the best.
-1
votes
1 answer

Compare lines in TXT file to excel file name in a directory using python

I have a TXT file which consists of names. I wanted to compare line from txt file to excel file name in the directory. Ex: TXT file name contains Johny Wick Rick I wanted to compare first line in TXT file Johny with the existing excel file name in…
Kalyan N
  • 57
  • 6
-1
votes
1 answer

Writing a list to a txt file with Python and AWS lambda

I am developing a lambda function that needs to write each element of a list 'my_list', in a line of my 'upload.txt' file. I have used the next code : my_list=['hello', 'world', 'good', 'morning'] with open("upload.txt", "w+") as a_file: for item…
baddy
  • 369
  • 1
  • 3
  • 23
-1
votes
1 answer

Correct way to limit document read in C without !feof, document error cannot read the .txt

I've been doing this C program which requires reading .txt files and so on. There's been lots of warning about using !feof but I still don't understand where the limitations !feof could bring. I wonder if the fault on my code today is really on…
Dean Debrio
  • 57
  • 1
  • 10
-1
votes
1 answer

Extracting data from old text file into usable format

I have some data in a text file in the following format: 1079,40,011,1,301 17,310 4,668 6,680 1,682 1,400 7,590 2,591 139,592 332,565 23,568 2,569 2,595 1,471 1,470 10,481 12,540 117,510 1,522 187,492 9,533 41,558 15,555 12,556 9,558 27,546 1,446…
-1
votes
2 answers

How to edit a line of a text file in python

I have a txt file that looks like this: 112 I just want to add 1 to that line using a Python command. Any ideas?
user17413709
-1
votes
1 answer

double space when exporting to TXT file in python

I have this code that works: print((tabulate(email_list, showindex=False, tablefmt = 'plain')), file=open(output + '\\' + "np.txt", "w")) but when I open the file, the email addresses look like this: b e r o s u n a @ g m a i l . c …
Berny
  • 113
  • 11
-1
votes
1 answer

how to store additional data in a text file apart from it's content - C++

I am doing this small university project, where I have to create a console-based text editor with some features, and making files password protected is one of them. As I said, it's a university project for an introductory OOP course, so it doesn't…
Saad Ahmed
  • 54
  • 1
  • 7
-1
votes
3 answers

How to extract only lines with specific word from text file and write a new one?

Whats the way to extract only lines with specific word only from requests (online text file) and write to a new text file? I am stuck here... This is my code: r = requests.get('http://website.com/file.txt'.format(x)) with open('data.txt', 'a') as…
Ali Alica
  • 1
  • 2
-1
votes
1 answer

Filter a list from the txt file under specific conditions

I need to filter a txt file on specific words. Words that end with 'd', that are less than 10 letters and words that have duplicate letters should be filtered out from the txt file. Then they should be returned as a list of words and number of words…
-1
votes
1 answer

Read from txt to dataframe with pattern in Python

I have a txt file with repeating lines: 1.json string 'x;y;z', hash 1234 2.json string 'xx;yy;zz', hash 5678 3.json and I really want to save it into dataframe with columns: | json | string | hash | As a result I would like a dataframe containing …
Forest
  • 1
  • 1
-1
votes
1 answer

c++ How to manipulate and work with UTF-8 characters

I am trying to read a UTF-8 encoded .txt file and need to do validations on it. I am working on Windows 10 even though I need the solution to work the same way on Linux. I work with Dev c++ 6.3, TDM-GCC 9.2.0 64-bit Compiler and I am compiling with…
ramej
  • 15
  • 6
-1
votes
1 answer

How to group the line in txt file to nested dictionary (Python)

I have a txt file that contain the data as below: Id_1 1111 Member_a 2222 Member_b 3333 Member_c 4444 Device_a 5555 Device_b 6666 Id_2 1234 Member_a 5678 Member_b 1345 Device_a 3141 Id_3 1317 Member_a 5643 Member_b 4678 Member_c 4654 Member_e…
P.Lim
  • 3
  • 1
-1
votes
4 answers

Convert text file into dictionary with multiple keys

I'm trying to read in a text file formatted like the following: student first name: John last name: Doe grade: 9 gpa: 4.0 school name: Richard High School city: Kansas City #### student first name: Jane last name:…