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

mi6crazyheart
mi6crazyheart Registered Posts: 7 ✭✭✭

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

Best Answer

  • MikeG
    MikeG Dataiker, Registered Posts: 15 Dataiker
    edited July 17 Answer ✓

    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

Answers

Setup Info
    Tags
      Help me…