cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Import Python Library

SOLVED
Atom

Does anyone know how to import python libraries (like pandas) under Alteryx??

 

Thanks. 

Sr. Community Content Manager
Sr. Community Content Manager

The Python SDK is a framework to develop new Alteryx tools with Python. 3rd party library installation instructions are available here. And examples of how to create tools with the Python SDK are here and here.

Atom

In fact, 

I'm trying to run a python code (test.py) whom the content is : 

 

 

 

#import librairies
import csv
import pandas as pd
import numpy as np

# read excel file and store it in file variable
file="input.xlsx"
xl = pd.ExcelFile(file)

# Define the dataFrame df1 : contains column metadata
df1 = xl.parse('sheet_1')
# Define the dataFrame df1 : contains line metadata
df2 = xl.parse('sheet_1')

# store excel file as csv for columns & ilnes metadata
df_columns = df1.to_csv("output1.csv", index = False)
df_lines = df2.to_csv("output2.csv", index = False)

 But I get errors. I thinks Alteryx is not able to get libraries or I'm not doing right.

 

Thanks for yor help.

 

Shaikle

 

 

Quasar

Follow the links that @NeilR shared. It's not getting the libraries because they do not exist on your machine. They need to be installed in a venv before they can be used.