Friday, April 09, 2010

First steps with Gridworks (3)

Once again I go back to the original file and, as I know that the first column has always the same format I will try: value.split(":")[-1] and the results will be:

And here we go:


In this case I've created a new column but I could have selected 'edit cell -> transform' to transform the original column directly.

Finally, to create exactly what I wanted:
value.split(':')[-2]+':'+value.split(':')[-1]

or
value.replace('Affymetrix:CompositeSequence:','')
or
value.split(':')[2,4].join(':')


In summary, with the last line of code, in a few seconds total (load the file and run the command) I can perform the desired transformation. Also, it would be helpful to be able to use the command "split multi-valued cells" with the choice of splitting into rows (as it is already possible now) or into columns (which is currently not possible).

No comments: