PyODPS is the SDK for Python of MaxCompute. PyODPS supports the DataFrame framework and basic operations on MaxCompute objects. You can use PyODPS to analyze data in MaxCompute. This topic describes how to develop a PyODPS script to interact with MaxCompute in an efficient manner for data processing.
Prerequisites
A Python development environment is configured. For more information, see Configure a Python development environment.
Procedure
In the Project section, right-click scripts and choose .
In the Create new MaxCompute python class dialog box, enter a class name in the Name field, select PyODPS Script from the Kind drop-down list, and then click OK.
Write the script code in the code editor. When you create a PyODPS script, a PyODPS room is used to automatically initialize the
odps
ando
objects in the PyODPS script template.When you develop a PyODPS script in DataWorks, a PyODPS room is automatically created. When you develop a PyODPS script in IntelliJ IDEA, you must manually create a PyODPS room. For more information, see the PyODPS documentation.