File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,18 @@ If you would prefer to keep the ``NA`` values you can manually fill them with ``
37
37
38
38
s[mask.fillna(True )]
39
39
40
+ If you create a column of ``NA `` values (for example to fill them later)
41
+ with ``df['new_col'] = pd.NA ``, the ``dtype `` would be set to ``object `` in the
42
+ new column. The performance on this column will be worse than with
43
+ the appropriate type. It's better to use
44
+ ``df['new_col'] = pd.Series(pd.NA, dtype=Int64) ``
45
+ (or another ``dtype `` as you desire).
46
+
47
+ .. ipython :: python
48
+ df = pd.DataFrame()
49
+ df[' objects' ] = pd.NA
50
+ df.dtypes
51
+
40
52
.. _boolean.kleene :
41
53
42
54
Kleene logical operations
Original file line number Diff line number Diff line change @@ -84,6 +84,18 @@ with the dtype.
84
84
In the future, we may provide an option for :class: `Series ` to infer a
85
85
nullable-integer dtype.
86
86
87
+ If you create a column of ``NA `` values (for example to fill them later)
88
+ with ``df['new_col'] = pd.NA ``, the ``dtype `` would be set to ``object `` in the
89
+ new column. The performance on this column will be worse than with
90
+ the appropriate type. It's better to use
91
+ ``df['new_col'] = pd.Series(pd.NA, dtype=Int64) ``
92
+ (or another ``dtype `` as you desire).
93
+
94
+ .. ipython :: python
95
+ df = pd.DataFrame()
96
+ df[' objects' ] = pd.NA
97
+ df.dtypes
98
+
87
99
Operations
88
100
----------
89
101
You can’t perform that action at this time.
0 commit comments