[proFit-list] deleting columns (or rows) in a function
Dave
glasspusher at outofoptions.net
Tue Feb 11 12:29:57 CST 2020
Awesome! I did not see these. They were in the “accessing data” popup menu, I was looking in “window/files”
Thanks.
> On Feb 11, 2020, at 10:23 AM, Scott Lasley <slasley at space.umd.edu> wrote:
>
> pf.DeleteColumns(window = , at = , count = ) or pf.DeleteRows(window = , at = , count = ) will delete count= columns or rows starting at position at= . For example, if you have a data window named MyData and want to delete columns 3 and 4, use
>
> pf.DeleteColumns(window='MyData', at=3, count=2)
>
> This will delete the columns, so the columns to the right of the last deleted column will shift left to "fill in the hole" and their indexes will change. If you just want to remove the data in a column you can use pf.SelectColumn(window = , column = , fromColumn = , toColumn = , options = ) and pf.Clear()
>
> pf.SelectColumn(window='MyData', firstColumn=3, lastColumn=4, options='forgetOld')
> pf.Clear(window='MyData')
>
> Or loop over the rows and use pf.ClearData(row, col) after setting the current window
>
> pf.SetCurrentWindow('MyData')
> for row in pf.RowRange():
> pf.ClearData(row, 3)
> pf.ClearData(row, 4)
>
> Scott
>
>> On Feb 11, 2020, at 9:14 AM, Dave <glasspusher at outofoptions.net> wrote:
>>
>> Hi,
>> Is there a way to programmatically delete columns (what I’m interested in right now) or rows from a data window in a Python script?
>>
>> Dave
>
>
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
More information about the proFit-list
mailing list