[Tutor] Only one value different columns

Richard Damon Richard at Damon-Family.org
Thu Mar 19 08:21:08 EDT 2020


On 3/19/20 5:42 AM, André Pinto wrote:
> I have a dataset with 22500 items (rows) and most rows show columns withX
> the same values. 
>
>  
>
> It is like this:
>
> Item    col1   col2    col 3     col 4  col5
>
> XYZ    4                     4            4
>
> PQR               12                               12
>
> ...
>
> 22500 rows
>
>  
>
> I need so:
>
> Item    col1   col2    col 3     col 4  col5
>
> XYZ                            4            
>
> PQR                                                   12
>
> ...
>
> 22500 rows
>
>  
>
> How can I keep only one value per row, determining the column I want with
> the respective value.
>
> Note: for each line the column I want to keep the value changes.
>
> It is possible?
>
>  
>
>  
>
> Com os cumprimentos
>
> Best Regards
>
> Atentos Saludos
>
>  
>
> André Luís M. Pinto
>
> * +55 (71) 98802-6841
>
> Skype ID:  <mailto:andre.luis.m.pinto at outlook.com>
> andre.luis.m.pinto at outlook.com
>
> P Antes de imprimir pense em seu comprimisso com o Meio Ambiente.
>
>
If you ALWAYS are going to have only one 'value' per row, it may be
better to define your dataset so each row has 3 fields,

The Item

The 'column'

The Value

-- 
Richard Damon



More information about the Tutor mailing list