Python tool - dataframe output issue
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
mjbarre2
5 - Atom
‎07-17-2023
08:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I'm having issues while using PDFplumber in the python tool. My Alteryx version is 2022.3.1.486. I'm trying to replicate the output from this site.
When trying to run my program, I get this error: "TypeError: input must be a pandas series, not a <class 'pandas.core.frame.DataFrame'>".
My code is (file path removed):
from ayx import Alteryx
import pdfplumber
import pandas as pd
file_path = "file path"
pdf = pdfplumber.open(file_path)
table = pdf.pages[0].extract_table()
df = pd.DataFrame(table[1::], columns=table[0])
Alteryx.write(df,1)
I've tried converting my desired df output to a series but then get an error stating only "only panda dataframes can be used to pass data to out going connections". Any help is appreciated. Thanks!
Labels:
- Labels:
- Developer
- Developer Tools
- Python
- Text Mining
0 REPLIES 0
