Questions tagged [txt]

txt is the conventional filename extension of text files.

1467 questions
-3
votes
0 answers

My java program no longer works as intended when I run it through an executable file

I created a debtor system which creates debtor proflies which are can be displayed in a table or edited, my data storage for the debtors is done through the use of a text file. The problem I have encountered is that when I run the program as an…
-3
votes
1 answer

Skipping lines in a txt file and start reading the data after that

I am trying to skip the first 23 lines of a txt file and read the data from line 24 onwards. The script itself worked fine before the file types changed and now I need to skip the first 23 rows of text. I have tried two ways: with…
asw107
  • 1
-3
votes
1 answer

text files are empty after I run my script

TL;DR When I run my program it deletes all my txt file data, I do not understand why. I'm making a waypoint editor/saver for my robot arm, and this program is meant to allow me to choose from a 'set' which is just a txt file, and then change or set…
-3
votes
1 answer

Import a very large txt file to Dynamobd

I have a huge txt file and I need to put it on DynamoDB. the file struct is: 223344|blue and orange|Red|16/12/2022 223344|blue and orange|Red|16/12/2022 ... This file has more than 200M lines I have tried to convert it on json file using this code…
-3
votes
2 answers

How do I read into a .txt and extract a certain string corresponding to a found string?

A folder contains a README.txt and several dicom files named emr_000x.sx (where x are numerical values). In the README.txt are different lines, one of which contains the characters "xyz" and a corresponding emr_000x.sx in the line. I would like to:…
sk23
  • 11
  • 2
-3
votes
4 answers

filenotfounderror: [errno 2] no such file or directory: .txt file

I am currently learning python and my instructor is telling me to open a text file using the open() meathod. I get the following error each time: FileNotFoundError: [Errno 2] No such file or directory: 'movies.txt' I have tried using online guides…
Stan U.
  • 1
  • 7
-3
votes
1 answer

Read floats from txt (that has special characters [ ] ) and store them into 2D array

I have the following .txt file: [0.03932153 0.10188484 0.23541254 0.18962094 0.43376015] [0.0453733 0.13984493 0.62747017 0.15459015 0.03272145] [0.0299296 0.1038427 0.74556143 0.03760473 0.08306153] [0.14998161 0.22125856 0.00924835…
pchi
  • 29
  • 4
-3
votes
3 answers

How do I find the highest value number of a text file?

I have a text file with many lines of numbers and wish to find the highest number. I have already found the average of all the numbers. Here is my code so far: file = open('max_vind_sola_enkelttall.txt', 'r') lines = file.read sum = 0 for lines in…
Jonas AAT
  • 11
  • 1
-3
votes
2 answers

read txt file in google colab

enter image description here I have a database in txt format and I just want to read numbers in float format. By what order is this possible? From line 9 to 254126 And columns 0 to 31 https://i.stack.imgur.com/WV6mu.png enter image description here
-3
votes
4 answers

How to read txt file in Pandas: Error tokenizing data

Question: I used pandas.read_csv to read txt files, but there are some errors. The process is shown below: import pandas as pd the txt file's path: './Data/fold2_l25431/test.txt' the example test.txt's content: (The first three lines of the txt,…
zeizeiv9
  • 1
  • 5
-3
votes
1 answer

How to replace the first line of a txt document

I would like to replace the first line of the document Vokabeln.txt, where the number of vocabularies is stored, so that when a vocabulary is added, the number is increased by one. Thanks for helping me. import java.io.*; public class…
-3
votes
4 answers

How can I read a txt file using python

data.txt I want to read this file using python.
-3
votes
1 answer

Can we use Google Script to import txt file and replace the targeted sheets?

My job requires updating data daily and presenting it on Google Data Studio. The input data will be refreshing daily and formatted as txt files (16 files to be exact). Then I have to import those files manually to multiple worksheets by replacing…
Daniel
  • 7
-3
votes
1 answer

filter even and odd values from a dictionary and add these even and odd values to lists.in python

I want to filter even and odd values from a dictionary. I tried to add these even and odd values to lists but I keep getting empty output, why? My code is like this: def Split(Dic1): even = [ele for ele in Dic1.values() if ele is 2 ==0] odd …
Tbb
  • 13
  • 2
-3
votes
1 answer

How to get all contents from .TXT file maintaining leading "0"?

I have this code Dim FileToOpen As Variant Dim OpenBook As Workbook FileToOpen = Application.GetOpenFilename("Text Files (*.txt), *.txt") If FileToOpen <> False Then Set OpenBook =…
Eduards
  • 68
  • 2
  • 20
1 2 3
97
98