Python Forum
Removing Certain Numbers From File
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing Certain Numbers From File
#2
Hi

My advice is by:
  • creating an array with all the numbers
  • using the modulo property (see numpy.mod) by an additional column
  • then looking for values where the rest is equal to zero (see numpy.where)
  • and finally deleting the corresponding rows (see numpy.delete)

Paul
Reply


Messages In This Thread
Removing Certain Numbers From File - by chascp - Feb-07-2020, 03:23 PM
RE: Removing Certain Numbers From File - by paul18fr - Feb-07-2020, 03:45 PM
RE: Removing Certain Numbers From File - by chascp - Feb-07-2020, 04:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Removing the unwanted data from a file jehoshua 14 4,404 Feb-01-2022, 09:56 PM
Last Post: jehoshua
  Calcolate the average of numbers from a .txt file francescomiles 2 3,121 Mar-27-2021, 02:43 PM
Last Post: francescomiles
  Read strings and numbers in columns from a file suvadip 4 3,075 Aug-11-2020, 09:37 PM
Last Post: suvadip
  removing duplicate numbers from a list calonia 12 5,652 Jun-16-2019, 12:09 PM
Last Post: DeaD_EyE
  Print Numbers starting at 1 vertically with separator for output numbers Pleiades 3 3,882 May-09-2019, 12:19 PM
Last Post: Pleiades
  writing numbers to csv file SchroedingersLion 7 4,212 Dec-20-2018, 10:48 AM
Last Post: perfringo
  Help deleting numbers from file names Shane 5 4,983 Feb-04-2018, 10:42 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020