Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to match two CSV files
#3
Thanks for your reply.

I used the code as mentioned (Python 2.7.15+ on ubuntu) and got this:

Error:
Traceback (most recent call last): File "a.py", line 30, in <module> c = assert_frame_equal(df1, df2, check_dtype=False) File "/usr/local/lib/python2.7/dist-packages/pandas/util/testing.py", line 1502, in assert_frame_equal obj='DataFrame.iloc[:, {idx}]'.format(idx=i)) File "/usr/local/lib/python2.7/dist-packages/pandas/util/testing.py", line 1336, in assert_series_equal obj='{obj}'.format(obj=obj)) File "pandas/_libs/testing.pyx", line 66, in pandas._libs.testing.assert_almost_equal File "pandas/_libs/testing.pyx", line 180, in pandas._libs.testing.assert_almost_equal File "/usr/local/lib/python2.7/dist-packages/pandas/util/testing.py", line 1094, in raise_assert_detail raise AssertionError(msg) AssertionError: DataFrame.iloc[:, 0] are different DataFrame.iloc[:, 0] values are different (100.0 %) [left]: [DataCol1, data1, data1] [right]: [ColName1, ea1, db1]

BTW - I'm not tied to using Pandas. If there is another simpler way, that's fine
Reply


Messages In This Thread
How to match two CSV files - by timlamont - Sep-29-2019, 08:25 AM
RE: How to match two CSV files - by Axel_Erfurt - Sep-29-2019, 09:24 AM
RE: How to match two CSV files - by timlamont - Sep-29-2019, 09:53 AM
RE: How to match two CSV files - by perfringo - Sep-29-2019, 10:21 AM
RE: How to match two CSV files - by timlamont - Sep-29-2019, 10:39 AM
RE: How to match two CSV files - by perfringo - Sep-30-2019, 05:02 AM
RE: How to match two CSV files - by buran - Sep-30-2019, 05:46 AM
RE: How to match two CSV files - by DeaD_EyE - Sep-30-2019, 07:16 AM
RE: How to match two CSV files - by DeaD_EyE - Oct-01-2019, 05:11 PM
RE: How to match two CSV files - by timlamont - Oct-01-2019, 05:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Move Files based on partial Match mohamedsalih12 2 879 Sep-20-2023, 07:38 PM
Last Post: snippsat
  Open and read multiple text files and match words kozaizsvemira 3 6,805 Jul-07-2021, 11:27 AM
Last Post: Larz60+
  Look for match in two files and print out in the first file Batistuta 0 1,620 Mar-03-2020, 02:27 PM
Last Post: Batistuta
  Compare two large CSV files for a match Python_Newbie9 3 5,851 Apr-22-2019, 08:49 PM
Last Post: ichabod801
  Match CSV files for difference Cuz 4 3,582 Dec-18-2018, 02:16 PM
Last Post: Cuz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020