Stack Exchange
concat() got multiple values for argument 'ignore_index'
Hi I'm getting this result, could you explain why?
data1980 = pd.read_excel ('/home/gsubuntu/Documents/כנרת/EXCEL/גולמיים/r1980.xlsx', sheet_name='גיליון1',encoding = "ISO-8859-8")

data1990 = pd.read_excel ('/home/gsubuntu/Documents/כנרת/EXCEL/גולמיים/r1990.xlsx', sheet_name='גיליון1',encoding = "ISO-8859-8")

data2000 = pd.read_excel ('/home/gsubuntu/Documents/כנרת/EXCEL/גולמיים/r2000.xlsx', sheet_name='גיליון1',encoding = "ISO-8859-8")

data2010 = pd.read_excel ('/home/gsubuntu/Documents/כנרת/EXCEL/גולמיים/r2010.xlsx', sheet_name='גיליון1',encoding = "ISO-8859-8")
​

rdata = pd.concat([data1980],[data1990],[data2000],[data2010],ignore_index=True)
​
​
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [7], in <module>
      3 data2000 = pd.read_excel ('/home/gsubuntu/Documents/כנרת/EXCEL/גולמיים/r2000.xlsx', sheet_name='גיליון1',encoding = "ISO-8859-8")
      4 data2010 = pd.read_excel ('/home/gsubuntu/Documents/כנרת/EXCEL/גולמיים/r2010.xlsx', sheet_name='גיליון1',encoding = "ISO-8859-8")
----> 6 rdata = pd.concat([data1980],[data1990],[data2000],[data2010],ignore_index=True)

TypeError: concat() got multiple values for argument 'ignore_index'


Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

You should put these in a single list as the first argument
  pd.concat([data1, data2, data3],ignore_index=True)

docs: https://pandas.pydata.org/docs/reference/api/pandas.concat.html
