Skip to content

system.dataset.join #51

Description

@JosephTLockwood

Function to join to datasets.

Currently, I only use the left joins. I am assuming this would most likely be able to do left, right, and inner joins.

def dataSetToDict(dataSet, headers = None):
	finalDict = {}
	if headers is None:
		headers = dataSet.getColumnNames().toArray()	
	
	for col in range(dataSet.getColumnCount()):	
		tempArray = []
		for row in range(dataSet.getRowCount()):
			value = dataSet.getValueAt(row, col)
			if value != 'None' and value is not None:
				#print(value)
				tempArray.append(value)
		finalDict[headers[col]] = tempArray
	
	return finalDict

Will work on this in free time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions