Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic elements when adding rows #576

Open
LucOevel opened this issue Dec 22, 2023 · 0 comments
Open

dynamic elements when adding rows #576

LucOevel opened this issue Dec 22, 2023 · 0 comments

Comments

@LucOevel
Copy link

see discussion in issue 572. Copy of the code example:

data = tablib.Dataset()

txt='''Greg Thorton
Dave Coutts
Joshua Ourisman'''

data.extend([item.split() for item in txt.splitlines()])

def dynamicColumn(row):
	return row[-1].upper()+'!'


data.append_col(dynamicColumn,'Calculated')  

data.append(('Brad','Montgomery', dynamicColumn))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant