It has some problems with Pylance and Microsoft Language Server. They are not smart enough. Could you have a try on JediLSP Language Server?
"python.languageServer": "JediLSP",
Update:
You can try to take 'import pyspark.sql' or 'from pyspark.sql import SparkSession' instead of 'import pyspark'.
It was designed like this. You can refer to this page for the explanation of the developer on this design.
Answer from Steven-MSFT on Stack OverflowVideos
Autocomplete works! I'am using macOS, but steps should be the same on Windows. Here is what I've done to get it:
1) Install Visual Studio IntelliCode extension

2)Quit both SparkAr and VSCode.

3)Open SparkAr and from there open your script.
And you will get it!

It's an old question, but if someone gets here when searching for the same problem in a more recent version (v101 in my case) here is one solution I found. In this version, the content in the folder '/private/var/folders/.../skylight-typedefs' is not included for some reason (the path can be found in the tsconfig.json that is created when adding a script to a project), so the IDE can't find the type definitions. I installed an older version and manually copied the files and added them back after upgrading to 101, then it worked.
The solution I found was to use the Jedi language server:-
"python.languageServer": "Jedi"
For Jupyter notebook you also need to set:-
"jupyter.enableExtendedPythonKernelCompletions": true
As mentioned in doc, you need to install and set up the Databricks extension for Visual Studio Code.
To enable IntelliSense (also known as code completion) in the Visual Studio Code code editor for PySpark, Databricks Utilities, and related globals such as spark and dbutils, do the following with your code project opened:
- On the Command Palette (View > Command Palette), type >Databricks: Configure autocomplete for Databricks globals and press Enter.
- Follow the on-screen prompts to allow the Databricks extension for
Visual Studio Code to install PySpark for your project, and to add
or modify the
__builtins__.pyifile for your project to enable Databricks Utilities.