スキル一覧に戻る
DegrassiAaron

spreadsheet-tools

by DegrassiAaron

0🍴 0📅 2025年10月19日
GitHubで見るManusで実行

SKILL.md


name: spreadsheet-tools description: Guides and code for creating, analyzing, and formatting spreadsheets. Use this skill to work with Excel files programmatically and apply data analysis techniques. license: MIT metadata: category: data

Spreadsheet Tools Manual

Overview

This skill provides instructions and code for manipulating spreadsheets, generating formulas, and analyzing data.

Working with pandas and openpyxl

Reading and Writing Excel Files

import pandas as pd

# Read Excel file
df = pd.read_excel('data.xlsx', sheet_name='Sheet1')

# Write DataFrame to a new Excel file
df.to_excel('output.xlsx', index=False)

Applying Formulas

from openpyxl import load_workbook

wb = load_workbook('output.xlsx')
ws = wb.active

# Insert formula into cell C2
ws['C2'] = '=SUM(A2:B2)'
wb.save('output_with_formula.xlsx')

Pivot Tables

# Create a pivot table
pivot = df.pivot_table(values='Sales', index='Region', columns='Quarter', aggfunc='sum')
pivot.to_excel('pivot_table.xlsx')

Charts in Excel

import xlsxwriter

workbook = xlsxwriter.Workbook('chart.xlsx')
worksheet = workbook.add_worksheet()
chart = workbook.add_chart({'type': 'line'})

# Write some data
data = [10, 40, 50, 20, 10, 50]
worksheet.write_column('A1', data)

# Configure chart
chart.add_series({'values': '=Sheet1!$A$1:$A$6'})
chart.set_title({'name': 'Sample Data'})
chart.set_x_axis({'name': 'Index'})
chart.set_y_axis({'name': 'Value'})

worksheet.insert_chart('C1', chart)
workbook.close()

Excel Best Practices

  • Use separate sheets for raw data, analysis, and results.
  • Name ranges and use table references for clarity.
  • Avoid hardcoding values in formulas; use cell references.
  • Document complex formulas with comments or a README.

Analytical Techniques

  • Descriptive statistics: mean, median, standard deviation.
  • Filtering and sorting: use pandas' query() and sort_values().
  • Time series analysis: convert date columns to datetime objects; resample using df.resample().

Additional Resources

  • pandas documentation.
  • openpyxl and xlsxwriter docs.
  • Excel Jet for formula tips.

スコア

総合スコア

45/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です