Skip to content

Commit de22c2a

Browse files
committed
Align scaleNodeProperties stream output
1 parent b179ef9 commit de22c2a

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

graphdatascience/procedure_surface/api/catalog/scale_properties_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def stream(
158158
Returns
159159
-------
160160
DataFrame
161-
DataFrame with nodeId and scaledProperties columns containing scaled property values.
161+
DataFrame with nodeId and scaledProperty columns containing scaled property values.
162162
Each row represents a node with its corresponding scaled property values.
163163
"""
164164
pass

graphdatascience/procedure_surface/arrow/catalog/scale_properties_arrow_endpoints.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ def stream(
120120
scaler=scaler_value,
121121
)
122122

123-
return self._node_property_endpoints.run_job_and_stream("v2/graph.nodeProperties.scale", G, config)
123+
result = self._node_property_endpoints.run_job_and_stream("v2/graph.nodeProperties.scale", G, config)
124+
result.rename(columns={"scaledProperties": "scaledProperty"}, inplace=True)
125+
126+
return result
124127

125128
def write(
126129
self,

graphdatascience/tests/integrationV2/procedure_surface/arrow/catalog/test_scale_properties_arrow_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_scale_properties_stream(
7676
G=sample_graph, node_properties=["prop1"], scaler=ScalerConfig(type="Log", offset=1.0)
7777
)
7878

79-
assert set(result_df.columns) == {"nodeId", "scaledProperties"}
79+
assert set(result_df.columns) == {"nodeId", "scaledProperty"}
8080
assert len(result_df) == 3 # We have 3 nodes
8181

8282

graphdatascience/tests/integrationV2/procedure_surface/cypher/catalog/test_scale_properties_cypher_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_scale_properties_stream(
6060
G=sample_graph, node_properties=["prop1"], scaler=ScalerConfig(type="Log", offset=1.0)
6161
)
6262

63-
assert set(result_df.columns) == {"nodeId", "scaledProperties"}
63+
assert set(result_df.columns) == {"nodeId", "scaledProperty"}
6464
assert len(result_df) == 3 # We have 3 nodes
6565

6666

0 commit comments

Comments
 (0)