[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Conversational Analytics Code Interpreter\n\n\u003cbr /\u003e\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThe Code Interpreter in [Conversational Analytics](/looker/docs/studio/conversational-analytics) translates your natural language questions into Python code and executes that code to provide advanced analysis and visualizations. The Code Interpreter is available for Conversational Analytics in Looker Studio as part of a Looker Studio Pro subscription, in Looker (original), and in Looker (Google Cloud core).\n\nIn contrast to standard SQL-powered BI experiences, the Code Interpreter supports a wide variety of data analytics---from basic computations and charting to more advanced tasks like time series forecasting. The Code Interpreter enhances Conversational Analytics by enabling users to perform these types of advanced analysis, which otherwise would typically require specialized knowledge of advanced coding or statistical methods.\n\nLearn [how and when Gemini\nfor Google Cloud uses your data](/gemini/docs/discover/data-governance).\n| As an early-stage technology, Gemini for Google Cloud\n| products can generate output that seems plausible but is factually incorrect. We recommend that you\n| validate all output from Gemini for Google Cloud products before you use it.\n| For more information, see\n| [Gemini for Google Cloud and responsible AI](/gemini/docs/discover/responsible-ai).\n\nBefore you begin\n----------------\n\nTo use the Code Interpreter, you must meet the requirements for using Conversational Analytics in [Looker Studio](/looker/docs/studio/conversational-analytics-looker-studio#before_you_begin) or in [Looker](/looker/docs/studio/conversational-analytics-looker#before_you_begin):\n\n- To use the Code Interpreter with a Looker (original) instance, your instance must be on Looker 25.8 or later.\n- To use the Code Interpreter with a Looker (Google Cloud core) instance, your instance must be on Looker 25.10 or later.\n- To use the Code Interpreter in Looker Studio, you must be a user under a Looker Studio Pro subscription.\n\nEnable the Code Interpreter\n---------------------------\n\nThis section describes how to enable the Code Interpreter in the following platforms:\n\n- [Looker Studio](#enable-ci-lsp)\n- [Looker (original)](#enable-ci-original)\n- [Looker (Google Cloud core)](#enable-ci-core)\n\n### Enable the Code Interpreter in Looker Studio\n\nTo enable the Code Interpreter for your conversations, follow these steps:\n\n1. In the left navigation panel within Conversational Analytics, click the **Advanced analytics** toggle to enable the Code Interpreter.\n2. With the Code Interpreter enabled, you can use Conversational Analytics as usual to start conversations and ask questions of your data. The Code Interpreter uses [the engine that powers Gemini chat](https://support.google.com/gemini/answer/14903178) to translate your queries into Python code and execute that code.\n\n### Enable the Code Interpreter in Looker (original)\n\nIn the Looker (original) instance, a Looker admin must follow these steps to enable the Code Interpreter and make it available to Gemini in Looker users:\n\n1. In the **Admin** panel, navigate to the **Platform** section and select the **Gemini in Looker** page.\n2. Under **Gemini in Looker enablement** , turn on the **Enable Gemini in Looker** setting.\n3. Select **Enable Trusted Tester Features** . When this setting is enabled, users can access the Trusted Tester capabilities of Gemini in Looker. **This setting must be enabled to allow users to access Gemini during the pre-GA preview.**\n4. Optionally, select **Enable Trusted Tester Data Use** . When this setting is enabled, you consent to your data being used by Google as described in the [Gemini for Google Cloud Trusted Tester Program terms](/trusted-tester/gemini-for-google-cloud-preview). This setting can be enabled only when the **Enable Trusted Tester Features** setting is enabled. This setting is enabled automatically when the **Enable Trusted Tester Features** setting is enabled.\n5. Select **Enable Code Interpreter** . When this setting is enabled, users can access the Code Interpreter in Conversational Analytics. This setting can be enabled only when the **Enable Trusted Tester Features** setting is also enabled. The Enable Code Interpreter setting was enabled by default for Looker (original) instances that met the following criteria:\n - A Looker admin turned on the **Enable Gemini in Looker** and **Enable Trusted Tester Features** settings on your Looker (original) instance before you updated your instance to Looker 25.8.\n - A Looker admin updated your instance to Looker 25.8 on the [first day of release deployments](/looker/docs/release-notes#May_14_2025).\n\nA Looker admin must [grant the `gemini_in_looker` permission](/looker/docs/admin-panel-platform-gil#grant-permissions-gil) to users before they can use the Code Interpreter.\n\n### Enable the Code Interpreter in Looker (Google Cloud core)\n\nIn the Looker (Google Cloud core) instance, a Looker admin must follow these steps to enable the Code Interpreter and make it available to Gemini in Looker users:\n\n1. Navigate to the **Admin** panel \\\u003e **Platform** section \\\u003e **Gemini in Looker** page.\n2. Enable **Code Interpreter**.\n\nThe Code Interpreter is disabled by default, even when **Gemini in Looker** is enabled in the Looker (Google Cloud core) instance settings in the Google Cloud console.\n\nA Looker admin must [grant the `gemini_in_looker` permission](/looker/docs/looker-core-admin-gemini#grant-permissions-gil) to users before they can use the Code Interpreter.\n\nKnown limitations\n-----------------\n\n- The Code Interpreter uses Python to solve problems. Since Python is more flexible than structured query languages, Code Interpreter responses might have more variability than responses from the core Conversational Analytics experience.\n- For Looker data, Conversational Analytics can return a maximum of 5,000 rows per query.\n- The Code Interpreter supports [these Python libraries](#supported_python_libraries). To request support for additional Python libraries, send an email to [conversational-analytics-feedback@google.com](mailto:conversational-analytics-feedback@google.com).\n- The following visualization chart types are not supported in Code Interpreter responses:\n - Maps\n\nFor information about additional limitations, see the documentation on [known limitations in Conversational Analytics](/looker/docs/studio/conversational-analytics#known-limitations).\n\n### Supported Python libraries\n\n#### Show supported Python libraries\n\nThe Code Interpreter supports the following Python libraries:\n\n- `altair`\n- `attrs`\n- `chess`\n- `contourpy`\n- `cycler`\n- `entrypoints`\n- `fonttools`\n- `fpdf`\n- `geopandas`\n- `imageio`\n- `jinja2`\n- `joblib`\n- `jsonschema`\n- `jsonschema-specifications`\n- `kiwisolver`\n- `lxml`\n- `markupsafe`\n- `matplotlib`\n- `mpmath`\n- `numexpr`\n- `numpy`\n- `opencv-python`\n- `openpyxl`\n- `packaging`\n- `pandas`\n- `patsy`\n- `pdfminer-six`\n- `pillow`\n- `plotly`\n- `protobuf`\n- `pylatex`\n- `pyparsing`\n- `PyPDF2`\n- `python-dateutil`\n- `python-docx`\n- `python-pptx`\n- `pytz`\n- `referencing`\n- `reportlab`\n- `rpds-py`\n- `scikit-image`\n- `scikit-learn`\n- `scipy`\n- `seaborn`\n- `six`\n- `statsmodels`\n- `striprtf`\n- `sympy`\n- `tabulate`\n- `tensorflow`\n- `threadpoolctl`\n- `toolz`\n- `torch`\n- `tzdata`\n- `xlrd`\n\n\nSuggested questions\n-------------------\n\nWhen you enable the Code Interpreter, Python's advanced analytic capabilities enable Conversational Analytics to answer a wider range of questions, in addition to [the standard types of supported questions](/looker/docs/studio/conversational-analytics#limitations-on-questions). For example:\n\n- Can you explain the key drivers for sales based on my data?\n- What is the lifetime value for each of my customer segments, taking into account the average purchase frequency and the average order value?\n- How do sales this year compare to sales last year?\n- Identify outliers in my sales data to help identify products or regions that are performing particularly well or particularly poorly.\n- Perform a cohort analysis to understand customer retention.\n- Are my highest margin products also the most popular products? Use this answer to provide a suggestion on how to optimize my product mix.\n- What is the compound annual growth rate (CAGR) for sales by product category for the last 3 years?\n- Show the CAGR as a bar chart with product category on the x-axis and CAGR on the y-axis."]]