You now have until September 15th to submit your use case or success story to the 2022 Dataiku Frontrunner Awards!ENTER YOUR SUBMISSION

Getting error - DSS doesn't support dataframes containing multiple columns with the same name.

Solved!
mi6crazyheart
Level 2
Getting error - DSS doesn't support dataframes containing multiple columns with the same name.

Hi,

I'm can't able to figure out why I'm getting following error "DSS doesn't support dataframes containing multiple columns with the same name."

But, in my dataframe I don't have any  multiple columns having same name.  Although, I've same data set having in two different columns with two different names.

Example:

Col1 | Col2
-------------------
111 | 111
--------------------
222 | 222
--------------------
333 | 333
--------------------
444 | 444
--------------------
555 | 555
--------------------

Screenshot attached -

dss-error.png

 

0 Kudos
1 Solution
MikeG
Dataiker
Dataiker

Hi @mi6crazyheart 

As a preamble, here’s a minimal test case for reproducing the reported error:

 

mydataset = dataiku.Dataset("community_25623")
df = pd.DataFrame([[1, 1]])
df.columns = ['id', 'id']
mydataset.write_dataframe(df)

 

Output:

 

Exception: DSS doesn't support dataframes containing multiple columns with the same name.

 

Next Actions

(1) Can you provide a copy of line 58 from the code throwing the error? Note: in the error message posted it says line 58 is throwing the error.

(2) For the dataframe mentioned on line 58 can you send me the output of

  • `print(df)`
  • `print(df.columns)`

For example, the output in my minimal test case looks like:

 

# print(df)
id id
0 1 1
# print(df.columns)
Index(['id', 'id'], dtype='object')

 

Thanks,
Mike

View solution in original post

2 Replies
MikeG
Dataiker
Dataiker

Hi @mi6crazyheart 

As a preamble, here’s a minimal test case for reproducing the reported error:

 

mydataset = dataiku.Dataset("community_25623")
df = pd.DataFrame([[1, 1]])
df.columns = ['id', 'id']
mydataset.write_dataframe(df)

 

Output:

 

Exception: DSS doesn't support dataframes containing multiple columns with the same name.

 

Next Actions

(1) Can you provide a copy of line 58 from the code throwing the error? Note: in the error message posted it says line 58 is throwing the error.

(2) For the dataframe mentioned on line 58 can you send me the output of

  • `print(df)`
  • `print(df.columns)`

For example, the output in my minimal test case looks like:

 

# print(df)
id id
0 1 1
# print(df.columns)
Index(['id', 'id'], dtype='object')

 

Thanks,
Mike

mi6crazyheart
Level 2
Author

Hey MikeG, 

I've fixed it. My bad, It had some duplicate columns. Thanks for heading me the right direction.

Have a Good Day 🙂