Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modifying anytree Nodes
#1
I'm using anytree 2.8 and I need to edit a node. Reviewing the documentation I cannot figure out how to either edit and existing node or replace it. Can someone point me in the right direction? TIA.
Reply
#2
I've never used this library, however the documentation says that apart from 'parent' and 'children', other nodes attributes are simply stored as object attributes. You can simply change the value of the attribute that you want to edit.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I rearrange df as the nodes index in pytorch geometric manner? uqlsmey 0 512 Jul-31-2023, 11:28 AM
Last Post: uqlsmey
  Python Anytree - Is not of type 'NodeMixin' error georgebijum 3 2,093 May-05-2022, 01:43 PM
Last Post: Gribouillis
  Modifying code cheburashka 1 1,299 Dec-13-2021, 01:01 PM
Last Post: Kebap
  Python3 binary tree not replacing parent nodes with child nodes Aspect11 0 1,775 Sep-23-2020, 02:22 PM
Last Post: Aspect11
  read individual nodes from an xml url using pandas mattkaplan27 5 2,952 Jul-05-2020, 10:06 PM
Last Post: snippsat
  anytree implicit node? gw1500se 0 1,713 Jun-07-2020, 08:42 PM
Last Post: gw1500se
  Animate graph nodes inside a function adamG 0 2,953 Sep-23-2019, 11:18 AM
Last Post: adamG
  Comms for multiple nodes. MuntyScruntfundle 1 1,897 Feb-18-2019, 03:54 PM
Last Post: Larz60+
  Modifying Lists RedSkeleton007 12 6,823 Nov-22-2017, 04:31 AM
Last Post: heiner55
  Randomise network while maintaining topology of nodes using edge-swap approach Tom1988 3 4,117 May-25-2017, 10:59 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020