This repository was archived by the owner on Aug 17, 2024. It is now read-only.
This repository was archived by the owner on Aug 17, 2024. It is now read-only.
[BUG] Creating new DataFrame from array with duplicate column names #126
Open
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Create data array with random values, eg: [[1,2,3] , [4,5,6]]
- Create column array with duplicates, eg: ["Column1" , "Column2" , "Column1"]
- Create new DataFrame object
- The values in the DataFrame will be: [["Column1" , "Column2"] , [3,2] , [6,5]]
Expected behavior
I would expect either an exception to be thrown "Duplicate columns detected, loss of data" or the second "Column1" to have a name such as "Column1-Duplicate1"
Desktop (please complete the following information):
- Google Apps Script, server side
Additional context
This generally isn't a problem once up and running, but I am using this api to read/write from google sheets by creating each sheet as a DataFrame. Any duplication of columns would be undetected and result in loss of data