neo4j-viz 0.7.0__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
neo4j_viz/pandas.py CHANGED
@@ -69,6 +69,9 @@ def _parse_nodes(node_dfs: DFS_TYPE, dropna: bool = False) -> list[Node]:
69
69
  mandatory_fields = {}
70
70
  properties = {}
71
71
  for key, value in row.to_dict().items():
72
+ if not isinstance(key, str):
73
+ key = str(key)
74
+
72
75
  if key in basic_node_fields_aliases:
73
76
  mandatory_fields[key] = value
74
77
  else:
@@ -98,6 +101,9 @@ def _parse_relationships(rel_dfs: DFS_TYPE, dropna: bool = False) -> list[Relati
98
101
  mandatory_fields = {}
99
102
  properties = {}
100
103
  for key, value in row.to_dict().items():
104
+ if not isinstance(key, str):
105
+ key = str(key)
106
+
101
107
  if key in basic_rel_field_aliases:
102
108
  mandatory_fields[key] = value
103
109
  else:
neo4j_viz/relationship.py CHANGED
@@ -64,6 +64,8 @@ class Relationship(
64
64
  caption_size: Optional[Union[int, float]] = Field(None, gt=0.0, description="The size of the caption text")
65
65
  #: The color of the relationship. Allowed input is for example "#FF0000", "red" or (255, 0, 0)
66
66
  color: Optional[ColorType] = Field(None, description="The color of the relationship")
67
+ # The width of the relationship
68
+ width: Optional[int | float] = Field(None, gt=0.0, description="The width of the relationship")
67
69
  #: Additional properties of the relationship that do not directly impact the visualization
68
70
  properties: dict[str, Any] = Field(
69
71
  default_factory=dict,