Skip to main content

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

Project description

py4conjoint

Microsoft/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_file = "responses.xlsx",
    n_cards        = 4,
    attributes     = cards,
    respondent_cols= {"性別": "gender"},
)

# Google Forms の回答CSVをlong形式に変換
df = pc.forms_to_conjoint_data(
    responses_file = "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.2.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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py4conjoint-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 54d293d0689b462eb7a8afa9b898f08c1d2ecdac4ac8cec0f5011bf5d8a025e7
MD5 e3a6ef057324f7aa6487e6c0a395c2c7
BLAKE2b-256 cd4b3539c1c9c508eeac9d491cf9591df8f2df7b6671853f06ca363d86fed3a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for py4conjoint-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: py4conjoint-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35ce48f7546496749399b624ac5a97f050e93bb2f28be129ff071aa7a9dfd094
MD5 5804ffcc72f5bfc5191a7989e6eff682
BLAKE2b-256 b39ff7183e115c54accc47898ad3c55facd356d7bb9cf67f7cfb966bc75e66dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for py4conjoint-0.1.2-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