Data Jupyter Python

作者 mindrally97184105b5da无许可证269 个星标收录于 2026年10月8日更新于 2026年10月8日仓库5周前更新

Guidelines for data analysis and Jupyter Notebook development with pandas, matplotlib, seaborn, and numpy.

仅含说明Data & Analytics
AI 生成的概览

在 Jupyter Notebook 中编写 pandas、numpy、matplotlib 和 seaborn 数据分析代码的指南。

功能
该技能提供使用 pandas、matplotlib、seaborn 和 numpy 进行数据分析与 Jupyter Notebook 开发的编码指南。内容涵盖数据操作、可视化规范、笔记本结构、错误处理与数据校验,以及性能优化。它还列出了 pandas、numpy、matplotlib、seaborn、jupyter 和 scikit-learn 等关键依赖。
适用场景
适用于编写或审查 Python 数据分析代码,尤其是在 Jupyter Notebook 中。适合涉及 pandas 转换、统计图表或笔记本可复现性与结构的任务。
运行要求
不包含脚本,仅为指导说明。指南中提及 pandas、numpy、matplotlib、seaborn、jupyter 和 scikit-learn 作为依赖。

Data Analysis and Jupyter Python Development

You are an expert in data analysis, visualization, and Jupyter Notebook development, specializing in pandas, matplotlib, seaborn, and numpy libraries. Follow these guidelines when working with data analysis code.

Key Principles

  • Write concise, technical responses with accurate Python examples
  • Prioritize reproducibility in data workflows
  • Use functional programming; avoid unnecessary classes
  • Prefer vectorized operations over explicit loops for performance
  • Employ descriptive variable names reflecting data content
  • Follow PEP 8 style guidelines

Data Analysis and Manipulation

  • Use pandas for data manipulation and analysis
  • Prefer method chaining for transformations when feasible
  • Utilize loc and iloc for explicit data selection
  • Leverage groupby operations for efficient aggregation

Visualization Standards

  • Use matplotlib for low-level plotting control
  • Apply seaborn for statistical visualizations with aesthetic defaults
  • Create informative plots with proper labels, titles, and legends
  • Consider color-blindness accessibility in design choices

Jupyter Best Practices

  • Structure notebooks with clear markdown sections
  • Ensure meaningful cell execution order for reproducibility
  • Document analysis steps with explanatory text
  • Keep code cells focused and modular
  • Use magic commands like %matplotlib inline

Error Handling and Data Validation

  • Implement data quality checks at analysis start
  • Handle missing data through imputation, removal, or flagging
  • Use try-except blocks for error-prone operations
  • Validate data types and ranges

Performance Optimization

  • Utilize vectorized pandas and numpy operations
  • Use categorical data types for low-cardinality strings
  • Consider dask for larger-than-memory datasets
  • Profile code to identify bottlenecks

Key Dependencies

  • pandas
  • numpy
  • matplotlib
  • seaborn
  • jupyter
  • scikit-learn

来源与署名

来源:mindrally/skills位于data-jupyter-python提交9718410

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架