Skip to main content

Google Forms の回答CSVを評点型コンジョイント分析用のlong形式DataFrameに変換するツール

Project description

py4conjoint

Google Forms の回答CSVを評点型コンジョイント分析用のlong形式DataFrameに変換するPythonパッケージです。

インストール

pip install py4conjoint

Google Colab では:

!pip install py4conjoint

使い方

import pandas as pd
import py4conjoint as pc

# カード設計(プロファイル)を作成
cards = pd.DataFrame({    # P1         P2       P3        P4
                "price":   [6,         10,      6,        10],
                "os":      ["android", "apple", "apple",  "android"],
                "camera":  ["標準",    "標準",  "高性能", "高性能"]
}, index=["P1", "P2", "P3", "P4"])


# Microsoft Forms の回答xlsxをlong形式に変換(デフォルト)
df = pc.forms_to_conjoint_data(
    responses_csv = "responses.xlsx",
    n_cards       = 4,
    attributes    = cards,
    respondent_cols= {"性別": "gender"},
)

# Google Forms の回答CSVをlong形式に変換
df = pc.forms_to_conjoint_data(
    responses_csv = "responses.csv",
    n_cards       = 4,
    attributes    = cards,
    respondent_cols= {"性別": "gender"},
    forms         = "google",
)

出力形式

   回答者ID プロファイルID  rating gender  price       os    camera
0        1            P1       4     女性      6  android      標準
1        1            P2       3     女性     10    apple      標準 
...

ライセンス

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py4conjoint-0.1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py4conjoint-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file py4conjoint-0.1.1.tar.gz.

File metadata

  • Download URL: py4conjoint-0.1.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py4conjoint-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d97250319d85f2eafc2163ba1fdddf9999194d6da843b643deb51bb6ea4f3e4c
MD5 19d3b0902cd06f25849cca0d043abc72
BLAKE2b-256 1fcc8efd4fca66071aa7b37ff35f1c77005dbbfeb454ccef2f9d0fa0c3e8433f

See more details on using hashes here.

Provenance

The following attestation bundles were made for py4conjoint-0.1.1.tar.gz:

Publisher: publish.yml on Py4Conjoint/py4conjoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py4conjoint-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: py4conjoint-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py4conjoint-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61b7a8c88f94e6d0d358e4785ffae253abd5a4d6ba82e43e5f91fc172281b4ec
MD5 cb7a80884d05cc43c0405f4bd3d2c0b9
BLAKE2b-256 114453caa66b0dbb55272f29403514170897af4be6b98e5edce0a28253fdc93b

See more details on using hashes here.

Provenance

The following attestation bundles were made for py4conjoint-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Py4Conjoint/py4conjoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page