MCPcopy Index your code
hub / github.com/pathwaycom/pathway / copy

Method copy

python/pathway/internals/table.py:1154–1178  ·  view source on GitHub ↗

Returns a copy of a table. Example: >>> import pathway as pw >>> t1 = pw.debug.table_from_markdown(''' ... age | owner | pet ... 10 | Alice | dog ... 9 | Bob | dog ... 8 | Alice | cat ... 7 | Bob | dog ... ''')

(self)

Source from the content-addressed store, hash-verified

1152 @contextualized_operator
1153 @check_arg_types
1154 def copy(self) -> Table[TSchema]:
1155 """Returns a copy of a table.
1156
1157 Example:
1158
1159 >>> import pathway as pw
1160 >>> t1 = pw.debug.table_from_markdown('''
1161 ... age | owner | pet
1162 ... 10 | Alice | dog
1163 ... 9 | Bob | dog
1164 ... 8 | Alice | cat
1165 ... 7 | Bob | dog
1166 ... ''')
1167 >>> t2 = t1.copy()
1168 >>> pw.debug.compute_and_print(t2, include_id=False)
1169 age | owner | pet
1170 7 | Bob | dog
1171 8 | Alice | cat
1172 9 | Bob | dog
1173 10 | Alice | dog
1174 >>> t1 is t2
1175 False
1176 """
1177
1178 return self._copy_as(type(self))
1179
1180 def _copy_as(self, table_type: type[TTable], /, **kwargs) -> TTable:
1181 columns = {

Callers 15

with_universe_ofMethod · 0.95
create_process_handlesFunction · 0.45
spawnFunction · 0.45
replayFunction · 0.45
web_dashboardFunction · 0.45
pytest_runtest_setupFunction · 0.45
pytest_runtest_teardownFunction · 0.45
debug_datasourceFunction · 0.45
rename_columnsMethod · 0.45
withoutMethod · 0.45
from_mappingMethod · 0.45

Calls 1

_copy_asMethod · 0.95

Tested by 15

pytest_runtest_setupFunction · 0.36
pytest_runtest_teardownFunction · 0.36
targetFunction · 0.36
test_copyFunction · 0.36
test_json_serdeFunction · 0.36
test_join_chain_1Function · 0.36
test_join_chain_2Function · 0.36
test_surprising_selfjoinFunction · 0.36
test_implicit_selfjoinFunction · 0.36
test_join_argsFunction · 0.36
test_table_getitemFunction · 0.36