LeMyst / WikibaseIntegrator

A Python module to manipulate data on a Wikibase instance (like Wikidata) through the MediaWiki Wikibase API and the Wikibase SPARQL endpoint.
MIT License
67 stars 14 forks source link

Removing a specific claim is missing in notebooks or common use #655

Open dpriskorn opened 9 months ago

dpriskorn commented 9 months ago

Something like this might work?

not_found_in = lexeme.claims.get(property="P9660")
        for claim in not_found_in:
            print(claim.mainsnak.datavalue)
            if claim.mainsnak.datavalue["value"]["id"] == "Q1186741":
                claim.remove()