Python Forum
Find a string from a column of one table in another table
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find a string from a column of one table in another table
#9
I was getting a warning that I ignored in my code. It doesn't cause any problems in my example, but it has potential for causing very confusing behaviors.

In my example I did this to make a new dataframe for suppliers:
supplier_table = product_table[["Description"]]
This does not create a new dataframe. It creates a slice of the product_table dataframe. What I should have done is make a copy of that slice so that supplier_table and product_table are independent.
supplier_table = product_table[["Description"]].copy()
Reply


Messages In This Thread
RE: Find a string from a column of one table in another table - by deanhystad - Sep-07-2023, 03:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  drawing a table with the status of tasks in each thread pyfoo 3 465 Mar-01-2024, 09:29 AM
Last Post: nerdyaks
  How to create a table with different sizes of columns in MS word pepe 8 1,679 Dec-08-2023, 07:31 PM
Last Post: Pedroski55
  Trying to get counts/sum/percentages from pandas similar to pivot table cubangt 6 1,498 Oct-06-2023, 04:32 PM
Last Post: cubangt
  dict table kucingkembar 4 785 Sep-30-2023, 03:53 PM
Last Post: deanhystad
  Going through HTML table with selenium emont 3 846 Sep-30-2023, 02:13 AM
Last Post: emont
Thumbs Up Convert word into pdf and copy table to outlook body in a prescribed format email2kmahe 1 794 Sep-22-2023, 02:33 PM
Last Post: carecavoador
  Using pyodbc&pandas to load a Table data to df tester_V 3 861 Sep-09-2023, 08:55 PM
Last Post: tester_V
Question Using SQLAlchemy, prevent SQLite3 table update by multiple program instances Calab 3 789 Aug-09-2023, 05:51 PM
Last Post: Calab
  Color a table cell based on specific text Creepy 11 2,118 Jul-27-2023, 02:48 PM
Last Post: deanhystad
Information Showing trendline formula in a table per product Carlossxx 0 703 May-03-2023, 08:34 AM
Last Post: Carlossxx

Forum Jump:

User Panel Messages

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