Note: By default, "graphframes" is not installed on the databricks.
You need to install the package explicitly.
You can install the packages in different methods.
Method1: Installing external packages using pip cmdlet.
Syntax: %sh /databricks/python3/bin/pip install <packagename>
%sh
/databricks/python3/bin/pip install graphframes

Method2: Using Databricks library utilities
Syntax:
dbutils.library.installPyPI("pypipackage", version="version", repo="repo", extras="extras")
dbutils.library.restartPython() # Removes Python state, but some libraries might not work without calling this function
To install graphframes using databricks library utilities use the below command.
dbutils.library.installPyPI("graphframes")

Tried the examples available in this article GraphFrames Documentation.
Notebook output:

Hope this helps.