SPSSINC Merge Tables - Selected Rows Only

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SPSSINC Merge Tables - Selected Rows Only

boschw
Hi all,

I am working on a somewhat complex reporting project.  Using SPSSINC MERGE TABLES, I need to replace selected rows of table 1 (which is unweighted) with the corresponding rows from table 2 (which IS weighted).  Both tables have exactly the same structure (shown below).  Specifically, I want the rows "      Hmong" through "      Somali" replaced with data from a 2nd table.  So far, I can only manage to merge the whole tables together using the “colfuncbynumber” function.  

I know by reading through the “SPSSINC_MERGE_TABLES.py” file that it is possible to limit which rows/columns get merged together.  I tried to create my own row function that would use the “colfuncbynumber” function in the selected rows I want replaced and otherwise do nothing.  I have been unsuccessful so far in my attempts to do so.  The error message I received was “cannot import name <NameOfRowFunc>”.  

Does anyone have any experience with creating custom merging functions who would be willing and able to help with this?  We are hoping to save a lot of time by merging these tables together in SPSS rather than copying and pasting tables together manually.  Thank you for any insight you're able to provide!

Walker

Table Structure