Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
from comments
  • Loading branch information
SemyonSinchenko committed Feb 2, 2026
commit 426dfd710ea4b77d6d35fbf9ae15d452d08ae9fd
10 changes: 5 additions & 5 deletions python/graphframes/graphframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def svdPlusPlus(
)

def triangleCount(
self, storage_level: StorageLevel, algorithm: str = "exact", log_nom_entries: int = 12
self, storage_level: StorageLevel, algorithm: str = "exact", lg_nom_entries: int = 12
) -> DataFrame:
"""
Computes the number of triangles passing through each vertex.
Expand All @@ -836,15 +836,15 @@ def triangleCount(

:param storage_level: Storage level for caching intermediate DataFrames.
:param algorithm: The triangle counting algorithm to use, "exact" or "approx" (default: "exact").
:param log_nom_entries: The log2 of the nominal entries for the Theta sketch (only used
if algorithm="approx"). Higher values increase accuracy at the
cost of memory. (default: 12).
:param lg_nom_entries: The log2 of the nominal entries for the Theta sketch (only used
if algorithm="approx"). Higher values increase accuracy at the
cost of memory. (default: 12).
:return: A DataFrame containing the vertex "id" and the triangle "count".
""" # noqa: E501
if (__version__[:3] < "4.1") and (algorithm == "approx"):
raise ValueError("approximate algorithm requires Spark 4.1+")
return self._impl.triangleCount(
storage_level=storage_level, algorithm=algorithm, log_nom_entries=log_nom_entries
storage_level=storage_level, algorithm=algorithm, log_nom_entries=lg_nom_entries
)

def powerIterationClustering(
Expand Down
Loading