I have came across a strange problem while working with the 'in_memory' workspace. Below is a small snippet where I summarize (Statistics_analysis tool) a table by a field called 'TWPSEC' to get the frequency of each unique value in the field. When I use the 'in_memory' workspace to store this table I am getting incorrect results, but when I use a file GDB, I get the correct results for the summarized table. The in_memory workspace is also a geodatabase, (although a temporary one) so I am not sure why I am getting different results. Has anyone else experienced this issue?
#ws = 'in_memory'
ws = r'G:\Map_Documents\Walkin_requests\Scratch.gdb'
# Summarize
sum_tab2 = p.join(ws,'sum_tab2')
arcpy.Statistics_analysis(copy_tab,sum_tab2,'TWPSEC COUNT','TWPSEC')
Here is what happens when I comment out the 'Scratch.gdb' and use the 'in_memory' workspace:[ATTACH=CONFIG]20509[/ATTACH]And here is what happens when I comment out the 'in_memory' workspace and use the 'Scratch.gdb'. I have not altered anything else in the code:[ATTACH=CONFIG]20510[/ATTACH]EDIT: I am using ArcGIS 10.1, SP 1 on Windows XP