A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: rename dataframe transforms (#5599)
Shahmir Varqha29ed3aea0189
diff --git a/frontend/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap b/frontend/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snapindex 945b9554c1..884abf477a 100644--- a/frontend/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap+++ b/frontend/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap@@ -18,18 +18,18 @@ exports[`renderZodSchema > should render a form aggregate 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r26»-form-item"+ for="«r24»-form-item">Columns</label><div- aria-describedby="«r26»-form-item-description"+ aria-describedby="«r24»-form-item-description"aria-invalid="false"class="relative"- id="«r26»-form-item"+ id="«r24»-form-item"><div- aria-controls="radix-«r27»"+ aria-controls="radix-«r25»"aria-expanded="false"aria-haspopup="dialog"class="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"@@ -69,18 +69,18 @@ exports[`renderZodSchema > should render a form aggregate 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 whitespace-pre"- for="«r28»-form-item"+ for="«r26»-form-item">Aggregations</label><div- aria-describedby="«r28»-form-item-description"+ aria-describedby="«r26»-form-item-description"aria-invalid="false"class="relative"- id="«r28»-form-item"+ id="«r26»-form-item"><div- aria-controls="radix-«r29»"+ aria-controls="radix-«r27»"aria-expanded="false"aria-haspopup="dialog"class="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"@@ -312,13 +312,13 @@ exports[`renderZodSchema > should render a form expand_dict 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r2q»-form-item"+ for="«r2o»-form-item">Column</label><buttonaria-autocomplete="none"- aria-controls="radix-«r2r»"+ aria-controls="radix-«r2p»"aria-expanded="false"class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xsSolid border border-input hover:shadow-smSolid focus:border-primary focus:shadow-mdSolid disabled:hover:shadow-xsSolid mb-0 min-w-[180px]"data-placeholder=""@@ -374,18 +374,18 @@ exports[`renderZodSchema > should render a form explode_columns 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r2o»-form-item"+ for="«r2m»-form-item">Columns</label><div- aria-describedby="«r2o»-form-item-description"+ aria-describedby="«r2m»-form-item-description"aria-invalid="false"class="relative"- id="«r2o»-form-item"+ id="«r2m»-form-item"><div- aria-controls="radix-«r2p»"+ aria-controls="radix-«r2n»"aria-expanded="false"aria-haspopup="dialog"class="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"@@ -565,18 +565,18 @@ exports[`renderZodSchema > should render a form group_by 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r1q»-form-item"+ for="«r1o»-form-item">Columns</label><div- aria-describedby="«r1q»-form-item-description"+ aria-describedby="«r1o»-form-item-description"aria-invalid="false"class="relative"- id="«r1q»-form-item"+ id="«r1o»-form-item"><div- aria-controls="radix-«r1r»"+ aria-controls="radix-«r1p»"aria-expanded="false"aria-haspopup="dialog"class="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"@@ -616,13 +616,13 @@ exports[`renderZodSchema > should render a form group_by 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 whitespace-pre"- for="«r1s»-form-item"+ for="«r1q»-form-item">Aggregation</label><buttonaria-autocomplete="none"- aria-controls="radix-«r1t»"+ aria-controls="radix-«r1r»"aria-expanded="false"class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xsSolid border border-input hover:shadow-smSolid focus:border-primary focus:shadow-mdSolid disabled:hover:shadow-xsSolid mb-0 min-w-[180px]"data-placeholder=""@@ -667,18 +667,18 @@ exports[`renderZodSchema > should render a form group_by 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r1u»-form-item"+ for="«r1s»-form-item">Drop N/A</label><buttonaria-checked="false"- aria-describedby="«r1u»-form-item-description"+ aria-describedby="«r1s»-form-item-description"aria-invalid="false"class="flex items-center justify-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"data-state="unchecked"data-testid="marimo-plugin-data-frames-boolean-checkbox"- id="«r1u»-form-item"+ id="«r1s»-form-item"role="checkbox"type="button"value="on"@@ -789,7 +789,7 @@ exports[`renderZodSchema > should render a form sample_rows 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r2a»-form-item"+ for="«r28»-form-item">Number of rows</label>@@ -801,13 +801,13 @@ exports[`renderZodSchema > should render a form sample_rows 1`] = `class="shadow-xsSolid hover:shadow-smSolid hover:focus-within:shadow-mdSolid flex overflow-hidden rounded-sm border border-input bg-background text-sm font-code ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-xsSolid focus-within:shadow-mdSolid focus-within:outline-none focus-within:ring-1 focus-within:ring-ring focus-within:border-primary h-6 w-full my-0"><input- aria-describedby="«r2a»-form-item-description"+ aria-describedby="«r28»-form-item-description"aria-roledescription="Number field"autocomplete="off"autocorrect="off"class="flex-1 w-full placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed disabled:opacity-50 px-1.5"data-rac=""- id="«r2a»-form-item"+ id="«r28»-form-item"inputmode="numeric"spellcheck="false"tabindex="0"@@ -819,11 +819,11 @@ exports[`renderZodSchema > should render a form sample_rows 1`] = `class="flex flex-col border-s-2"><button- aria-controls="«r2a»-form-item"+ aria-controls="«r28»-form-item"aria-label="Increase"class="cursor-default text-muted-foreground pressed:bg-muted-foreground group-disabled:text-disabled-foreground outline-none focus-visible:text-primary disabled:cursor-not-allowed disabled:opacity-50 hover:text-primary hover:bg-muted px-0.5"data-rac=""- id="react-aria-«r2h»"+ id="react-aria-«r2f»"slot="increment"tabindex="-1"type="button"@@ -850,11 +850,11 @@ exports[`renderZodSchema > should render a form sample_rows 1`] = `class="h-[1px] flex-shrink-0 divider bg-border z-10"/><button- aria-controls="«r2a»-form-item"+ aria-controls="«r28»-form-item"aria-label="Decrease"class="cursor-default text-muted-foreground pressed:bg-muted-foreground group-disabled:text-disabled-foreground outline-none focus-visible:text-primary disabled:cursor-not-allowed disabled:opacity-50 hover:text-primary hover:bg-muted px-0.5"data-rac=""- id="react-aria-«r2i»"+ id="react-aria-«r2g»"slot="decrement"tabindex="-1"type="button"@@ -934,18 +934,18 @@ exports[`renderZodSchema > should render a form sample_rows 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r2n»-form-item"+ for="«r2l»-form-item">Sample with replacement</label><buttonaria-checked="false"- aria-describedby="«r2n»-form-item-description"+ aria-describedby="«r2l»-form-item-description"aria-invalid="false"class="flex items-center justify-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"data-state="unchecked"data-testid="marimo-plugin-data-frames-boolean-checkbox"- id="«r2n»-form-item"+ id="«r2l»-form-item"role="checkbox"type="button"value="on"@@ -1090,13 +1090,13 @@ exports[`renderZodSchema > should render a form sort_column 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r1f»-form-item"+ for="«r1d»-form-item">Column</label><buttonaria-autocomplete="none"- aria-controls="radix-«r1g»"+ aria-controls="radix-«r1e»"aria-expanded="false"class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xsSolid border border-input hover:shadow-smSolid focus:border-primary focus:shadow-mdSolid disabled:hover:shadow-xsSolid mb-0 min-w-[180px]"data-placeholder=""@@ -1141,18 +1141,18 @@ exports[`renderZodSchema > should render a form sort_column 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r1h»-form-item"+ for="«r1f»-form-item">Ascending</label><buttonaria-checked="false"- aria-describedby="«r1h»-form-item-description"+ aria-describedby="«r1f»-form-item-description"aria-invalid="false"class="flex items-center justify-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"data-state="unchecked"data-testid="marimo-plugin-data-frames-boolean-checkbox"- id="«r1h»-form-item"+ id="«r1f»-form-item"role="checkbox"type="button"value="on"@@ -1168,17 +1168,17 @@ exports[`renderZodSchema > should render a form sort_column 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r1i»-form-item"+ for="«r1g»-form-item">N/A position</label><div- aria-describedby="«r1i»-form-item-description"+ aria-describedby="«r1g»-form-item-description"aria-invalid="false"aria-required="false"class="flex flex-row gap-2 pt-1 items-center"dir="ltr"- id="«r1i»-form-item"+ id="«r1g»-form-item"role="radiogroup"style="outline: none;"tabindex="0"@@ -1250,18 +1250,18 @@ exports[`renderZodSchema > should render a form unique 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r31»-form-item"+ for="«r2v»-form-item">Columns</label><div- aria-describedby="«r31»-form-item-description"+ aria-describedby="«r2v»-form-item-description"aria-invalid="false"class="relative"- id="«r31»-form-item"+ id="«r2v»-form-item"><div- aria-controls="radix-«r32»"+ aria-controls="radix-«r30»"aria-expanded="false"aria-haspopup="dialog"class="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"@@ -1301,13 +1301,13 @@ exports[`renderZodSchema > should render a form unique 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 whitespace-pre"- for="«r33»-form-item"+ for="«r31»-form-item">Keep</label><buttonaria-autocomplete="none"- aria-controls="radix-«r34»"+ aria-controls="radix-«r32»"aria-expanded="false"class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xsSolid border border-input hover:shadow-smSolid focus:border-primary focus:shadow-mdSolid disabled:hover:shadow-xsSolid mb-0 min-w-[180px]"data-placeholder=""@@ -1352,13 +1352,13 @@ exports[`renders custom forms column_id 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r3a»-form-item"+ for="«r38»-form-item">Column</label><buttonaria-autocomplete="none"- aria-controls="radix-«r3b»"+ aria-controls="radix-«r39»"aria-expanded="false"class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xsSolid border border-input hover:shadow-smSolid focus:border-primary focus:shadow-mdSolid disabled:hover:shadow-xsSolid mb-0 min-w-[180px]"data-placeholder=""@@ -1401,18 +1401,18 @@ exports[`renders custom forms column_id_array 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r3h»-form-item"+ for="«r3f»-form-item">Columns</label><div- aria-describedby="«r3h»-form-item-description"+ aria-describedby="«r3f»-form-item-description"aria-invalid="false"class="relative"- id="«r3h»-form-item"+ id="«r3f»-form-item"><div- aria-controls="radix-«r3i»"+ aria-controls="radix-«r3g»"aria-expanded="false"aria-haspopup="dialog"class="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"@@ -1452,13 +1452,13 @@ exports[`renders custom forms column_id_dot_array 1`] = `class="flex flex-col gap-1"><div- aria-describedby="«r3j»-form-item-description"+ aria-describedby="«r3h»-form-item-description"aria-invalid="false"class="relative"- id="«r3j»-form-item"+ id="«r3h»-form-item"><div- aria-controls="radix-«r3k»"+ aria-controls="radix-«r3i»"aria-expanded="false"aria-haspopup="dialog"class="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"@@ -1499,13 +1499,13 @@ exports[`renders custom forms column_id_optional 1`] = `><labelclass="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"- for="«r3l»-form-item"+ for="«r3j»-form-item">Column</label><buttonaria-autocomplete="none"- aria-controls="radix-«r3m»"+ aria-controls="radix-«r3k»"aria-expanded="false"class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xsSolid border border-input hover:shadow-smSolid focus:border-primary focus:shadow-mdSolid disabled:hover:shadow-xsSolid mb-0 min-w-[180px]"data-placeholder=""diff --git a/frontend/src/plugins/impl/data-frames/types.ts b/frontend/src/plugins/impl/data-frames/types.tsindex c391c40cae..3add62304f 100644--- a/frontend/src/plugins/impl/data-frames/types.ts+++ b/frontend/src/plugins/impl/data-frames/types.ts@@ -34,14 +34,12 @@ export const NUMPY_DTYPES = ["float16","float32","float64",- "float128","complex64","complex128",- "complex256","bool","object",- "string_",- "unicode_",+ "str",+ "unicode","datetime64","timedelta64",] as const;@@ -62,14 +60,12 @@ export function numpyTypeToDataType(case "float16":case "float32":case "float64":- case "float128":return "number";case "complex64":case "complex128":- case "complex256":case "object":- case "string_":- case "unicode_":+ case "str":+ case "unicode":return "string";case "bool":return "boolean";