-
Core Designer Course| Request for feedback
Hi! I had a dataset with a column for country, a column with 5 different years x country and a column with some statistics. I wanted to: 1) Rank each country for each year on that statistic 2) Compute difference between the stat of yeach year compared to the previous year What I did: 1) Pivoted the df, so that I had one…
-
Sorting dataset for pivot
Is there a way to guarantee a dataset is sorted in order to pivot it? In the past I had to add an additional Python or SQL recipe to sort the data, but I realized that even this is not 100% working anymore. Sometimes after an SQL ORDER BY or a Pandas sort_values the resulting dataset contains random rows that are not…
-
Inconsistencies between pivot visual processor and pandas' pivot method.
I am trying to reshape a dataset using pivot. My dataset structure is like this : ['column A', 'column B', 'index', 'label', 'value']. I have preprocessed the data using a Python script : 1) sorting the index column I want to use as my pivot, and 2) reordering the columns so that my dataset is now : ['index', 'label',…
-
Pivot is clearing all other column
Hi, I am trying to do a pivot on a dataset and everything is working except that all the column not used in the pivot are cleared. In the recipe itself it work but when I run it, all columns are blank. I tried to put other colomns to "keep if constant", "make an array" and even "keep first value" but it's still the same.…
-
How to Pivot
Hi all, I'm new to DSS and trying to work around the pivot in prepare recipe. Sample test case: The first 2 tables show the sample input and output that I require. The third image shows the setting I've applied on my the pivot formula. Real case scenario: Multiple characteristic columns to pivot on e.g. Company, Company…