Skip to content

Commit

Permalink
#2285 Changed argument usecols to col_start and col_last for read_mpr
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Apr 13, 2023
1 parent 993ec8c commit 9fae26f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions scripts/python/examples/read_ascii_mpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@
##

if len(sys.argv) != 2:
print("ERROR: read_ascii_point.py -> Must specify exactly one input file.")
sys.exit(1)
print("ERROR: read_ascii_mpr.py -> Must specify exactly one input file.")
sys.exit(1)

# Read the input file as the first argument
input_file = os.path.expandvars(sys.argv[1])
try:
print("Input File:\t" + repr(input_file))
print("Input File:\t" + repr(input_file))

# Read MPR lines, skipping the header row and first column.
mpr_data = mpr_data.read_mpr(input_file)
print("Data Length:\t" + repr(len(mpr_data)))
print("Data Type:\t" + repr(type(mpr_data)))
# Read MPR lines by using pandas package, skipping the header row and
# first column. Input should be a 36 column text data.
mpr_data = mpr_data.read_mpr(input_file, col_start=1, col_last=36, skiprows=1)
print("Data Length:\t" + repr(len(mpr_data)))
print("Data Type:\t" + repr(type(mpr_data)))
except NameError:
print("Can't find the input file")
print("Can't find the input file")

########################################################################

0 comments on commit 9fae26f

Please sign in to comment.