File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
docs/source/user-guide/common-operations Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ Convert to timestamps using :py:func:`~datafusion.functions.to_timestamp`
7878
7979 df.select(f.to_timestamp(col(' "Total"' )).alias(" timestamp" ))
8080
81+
8182 String
8283------
8384
@@ -101,6 +102,17 @@ This also includes the functions for regular expressions like :py:func:`~datafus
101102 f.regexp_replace(col(' "Name"' ), literal(" saur" ), literal(" fleur" )).alias(" flowers" )
102103 )
103104
105+ Casting
106+ -------
107+
108+ Casting expressions to different data types using :py:func: `~datafusion.functions.arrow_cast `
109+
110+ .. ipython :: python
111+
112+ df.select(
113+ f.arrow_cast(col(' "Total"' ), " Float64" ).alias(" total_as_float" ),
114+ f.arrow_cast(col(' "Total"' ), " Int32" ).alias(" total_as_int" )
115+ )
104116
105117 Other
106118-----
You can’t perform that action at this time.
0 commit comments