'TypeError: First element of field tuple is neither a tuple nor str
I am a beginner to RAPIDS. I am trying to run the following code on Colab. It is resulting in an error. TypeError: First element of field tuple is neither a tuple nor str
Similari code runs well while using pandas. But failing while using cudf dataframe apply.
Code Snippet:
dataSet_formatted_gdf = cudf.DataFrame.from_pandas(pd.DataFrame(dataset_formatted_npa)) conAttrs_gdf = cudf.DataFrame.from_pandas(pd.DataFrame(dataset_formatted_npa[:, 0]))
equivalenceClasses = conAttrs_gdf.groupby(0).groups
decAttr_gdf = cudf.DataFrame.from_pandas(pd.DataFrame(dataset_formatted_npa[:, 1]))
decisionClasses = decAttr_gdf.groupby(0).groups
rough_membership_values = dataSet_formatted_gdf.apply(lambda x: calculateRoughMembership(x, equivalenceClasses, decisionClasses), axis=1)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
