pandas: powerful Python data analysis toolkit - 0.12of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make 202 In [73]: f = lambda x: x.fillna(x.mean()) In [74]: transformed = grouped.transform(f) We can verify that the group means have not changed in the transformed data and that the transformed data contains GR 234 234 234 JP 264 264 264 UK 251 251 251 US 251 251 251 In [80]: grouped_trans.size() # Verify non-NA count equals group size GR 234 JP 264 UK 251 US 251 dtype: int64 250 Chapter 12. Group0 码力 | 657 页 | 3.58 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.13.1of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make columns] In [76]: f = lambda x: x.fillna(x.mean()) In [77]: transformed = grouped.transform(f) We can verify that the group means have not changed in the transformed data and that the transformed data contains 267 267 267 UK 247 247 247 US 258 258 258 [4 rows x 3 columns] In [83]: grouped_trans.size() # Verify non-NA count equals group size Out[83]: GR 228 JP 267 UK 247 US 258 dtype: int64 13.5 Filtration0 码力 | 1219 页 | 4.81 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.14.0of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make 217 In [77]: f = lambda x: x.fillna(x.mean()) In [78]: transformed = grouped.transform(f) We can verify that the group means have not changed in the transformed data and that the transformed data contains Release 0.14.0 JP 267 267 267 UK 247 247 247 US 258 258 258 In [84]: grouped_trans.size() # Verify non-NA count equals group size Out[84]: GR 228 JP 267 UK 247 US 258 dtype: int64 Note: Some0 码力 | 1349 页 | 7.67 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.7.1of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make concat(objs, axis=0, join=’outer’, join_axes=None, ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False) • objs: list or dict of Series, DataFrame, or Panel objects. If a dict is passed the keys • names: list, default None. Names for the levels in the resulting hierarchical index • verify_integrity: boolean, default False. Check whether the new concatenated axis contains duplicates. This0 码力 | 281 页 | 1.45 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.7.2of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make concat(objs, axis=0, join=’outer’, join_axes=None, ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False) • objs: list or dict of Series, DataFrame, or Panel objects. If a dict is passed the keys • names: list, default None. Names for the levels in the resulting hierarchical index • verify_integrity: boolean, default False. Check whether the new concatenated axis contains duplicates. This0 码力 | 283 页 | 1.45 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.7.3of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make concat(objs, axis=0, join=’outer’, join_axes=None, ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False) • objs: list or dict of Series, DataFrame, or Panel objects. If a dict is passed the keys • names: list, default None. Names for the levels in the resulting hierarchical index • verify_integrity: boolean, default False. Check whether the new concatenated axis contains duplicates. This0 码力 | 297 页 | 1.92 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.15of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make 217 In [79]: f = lambda x: x.fillna(x.mean()) In [80]: transformed = grouped.transform(f) We can verify that the group means have not changed in the transformed data and that the transformed data contains GR 228 228 228 JP 267 267 267 UK 247 247 247 US 258 258 258 In [86]: grouped_trans.size() # Verify non-NA count equals group size Out[86]: GR 228 JP 267 UK 247 US 258 dtype: int64 Note: Some0 码力 | 1579 页 | 9.15 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.15.1of unit tests covering about 97% of the codebase as of this writing. To run it on your machine to verify that everything is working (and you have all of the dependencies, soft and hard, installed), make 217 In [77]: f = lambda x: x.fillna(x.mean()) In [78]: transformed = grouped.transform(f) We can verify that the group means have not changed in the transformed data and that the transformed data contains Release 0.15.1 JP 267 267 267 UK 247 247 247 US 258 258 258 In [84]: grouped_trans.size() # Verify non-NA count equals group size Out[84]: GR 228 JP 267 UK 247 US 258 dtype: int64 Note: Some0 码力 | 1557 页 | 9.10 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.3unit tests, covering about 97% of the code base as of this writing. To run it on your machine to verify that everything is working (and that you have all of the dependencies, soft and hard, installed) DataFrame is a Series. As a single column is selected, the returned object is a pandas Series. We can verify this by checking the type of the output: In [6]: type(titanic["Age"]) Out[6]: pandas.core.series You might wonder what actually changed, as the first 5 lines are still the same values. One way to verify is to check if the shape has changed: In [22]: age_no_na.shape Out[22]: (714, 12) For more dedicated0 码力 | 3603 页 | 14.65 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.4unit tests, covering about 97% of the code base as of this writing. To run it on your machine to verify that everything is working (and that you have all of the dependencies, soft and hard, installed) DataFrame is a Series. As a single column is selected, the returned object is a pandas Series. We can verify this by checking the type of the output: In [6]: type(titanic["Age"]) Out[6]: pandas.core.series You might wonder what actually changed, as the first 5 lines are still the same values. One way to verify is to check if the shape has changed: In [22]: age_no_na.shape Out[22]: (714, 12) For more dedicated0 码力 | 3605 页 | 14.68 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













