Community Detection with GDS

I am trying to work on Community Detection with GDS.
In the One Hot Encoding I am unable to proceed further and I am stuck.

Encoding Categorical variables

After running the query I am getting the results

Output: (no changes, no records)

MATCH (p:Person)
SET p.PunctualityEncoding = CASE p['Punctuality']
WHEN 'i am often running late' THEN 1
WHEN 'i am often early' THEN 3
WHEN 'i am always on time' THEN 5
ELSE 3 END

What's the problem with the query?
Kindly revert to me.

Thanks
Siva

Hi, I think this is a classic CASE logic issue. I detail some of this in my article: Cypher Sleuthing: the CASE statement | by Jennifer Reif | Medium

What I think you need is something like this.

MATCH (p:Person)
WITH p, CASE p['Punctuality']
WHEN 'i am often running late' THEN 1
WHEN 'i am often early' THEN 3
WHEN 'i am always on time' THEN 5
ELSE 3 END as puncValue
SET p.PunctualityEncoding = puncValue