473,395 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How do I remove certain strings starting from a specific text in a text file

Hello,
I am very new to python.
I have a text file and a python script .
I am calling the txt file in the script which fetches the data and logs into a csv file.
Now I want to remove certain data from the text file before logging to csv. how do i do that
Dec 16 '19 #1
1 1210
dwblas
626 Expert 512MB
Set a boolean when the specific text is found, and then if the_boolen, remove certain strings.
Dec 16 '19 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: tomtown.net | last post by:
Hello I'm trying to get a single line removed from a text file using a search pattern (pretty simple: if line contains "NODE1") -> remove line). To achieve this I's like to operate with only the...
8
by: Paul | last post by:
Hi, My VB is very rusty I'm afraid! What would be the most efficient way to remove the following ASCII characters from a string? à è ì ò ù À È Ì Ò Ù á é í ó ú ý Á É Í Ó Ú Ý â ê î ô û Â Ê Î Ô...
15
by: batman | last post by:
i have a text file that is like: date = OCT0606 asdf sdaf asdfasdgsdgh asdfsdfasdg START-OF-DATA asdfasdfg asdfgdfgsfg
2
by: Ellen | last post by:
Hi All - I have some data that I export from Access to a pipe-delimited text file. Unfortunately, the text file always has a carriage return symbol at the end. I need to export this file...
9
by: andy.z | last post by:
If 2 people try to access the same text file at the same time to write to it - what happens in PHP ? What I mean is - presumably the first will be ok - But what will the second person actually...
8
by: Umesh | last post by:
Please help. THANKS.
1
by: Arielle | last post by:
The Problem: Currently working on a way to catalog a large flux of files into a database. The files are for the most part uniform but some of the flags in the database fields vary depending on the...
2
by: dpw.asdf | last post by:
I have been searching all over for a solution to this. I am new to Python, so I'm a little lost. Any pointers would be a great help. I have a couple hundred emails that contain data I would like to...
2
by: Chris9 | last post by:
I need to remove line breaks from a large ASCII table, but get a MemoryError. The data is an ASCII grid: the header takes up the first 6 lines followed by 22000 rows of data. I want to remove the...
0
by: xakzyy | last post by:
Hello peeps! I need some help to decrypt my text file and make it able to read in my program.. What I have programmed so far is to read the encrypted file, create a new file, decrypt it and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.