Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-06-2021 12:47 PM
I'm using Pandas to write some values in a CSV file, and ingesting this CSV with the Neo4J Python driver.
In order to speed up the project I'm working I setted a default value ("REPLACE_ME_PLEASE") using the Pandas fillna method to populate null values in the CSV.
Now there's only one thing left:
I can have multiple queries to search through each node label and delete this default values, but I'm looking for a query that can ignore node labels and attribute labels, and search only through attribute values.
Is this possible?
Solved! Go to Solution.
07-06-2021 12:57 PM
Looks a bit cumbersome, as you could have just left those values as null then they wouldn't have been added in the first place.
Depending on the size of your graph this should work:
MATCH (n)
WITH n, [k in keys(n) WHERE n[k] = 'default_value' | k] as keys
call apoc.create.removeProperties(n, keys) yield node
return count(*);
07-06-2021 12:57 PM
Looks a bit cumbersome, as you could have just left those values as null then they wouldn't have been added in the first place.
Depending on the size of your graph this should work:
MATCH (n)
WITH n, [k in keys(n) WHERE n[k] = 'default_value' | k] as keys
call apoc.create.removeProperties(n, keys) yield node
return count(*);
07-06-2021 01:02 PM
Thank you, this works beautifully
All the sessions of the conference are now available online