Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Level V

Changing column types

Hi all,

In my code, I am extracting values from a csv file and putting them into columns.  In my function, I create new columns that are all numeric.  However, on some particular columns, no values are entered into the columns and in the log it says:

Column "Column 48" changed to type Numeric to match formula

BUT I originally made it a numeric column AND it doesn't do this for all the new columns..  I wish I could share the csv file, but I can not.  However, there are numbers in those cells that I am extracting from.  Any ideas?

listIdleakFunction = Function( {device, idleakCol, isleakCol, igleakCol, ibleakCol, deviceRow},

//device --> name of device

//idleakCol --> where does the swept data start in the csv file?

//deviceRow --> which row are we on in the the csv file? Data is logged in columns, not rows


      startColId = idleakCol;

      startColIs = isleakCol;

      startColIg = igleakCol;

      startColIb = ibleakCol;

      csvRow = deviceRow;


      dtSummary << New Column( name || " Id", Numeric, Continuous );

      dtSummary << New Column( name || " Is", Numeric, Continuous );

      dtSummary << New Column( name || " Ig", Numeric, Continuous );

      dtSummary << New Column( name || " Ib", Numeric, Continuous );


      Current Data Table = (dtSummary);

      nCols = N Col( dtSummary );  

      colId = Column( nCols -3 );

      colIs = Column(nCols-2);

      colIg = Column(nCols-1);

      colIb = Column(nCols);


      For( k = 1, k <= (66), k++,


            Current Data Table( dt );


            col1 = Column(startColId );

            col2 = Column(startColIs);

            col3 = Column(startColIg);

            col4 = Column(startColIb);

            dtSummary:colId[k] =Num(dt:col1[csvRow] )/1E6;

            dtSummary:colIs[k] =Num(dt:col2[csvRow])/1E9 ;

            dtSummary:colIg[k] =Num(dt:col3[csvRow])/1E9 ;

            dtSummary:colIb[k] =Num(dt:col4[csvRow] )/1E6;







Article Labels

    There are no labels assigned to this post.