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"])

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

出力形式

   回答者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.0.tar.gz (7.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.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py4conjoint-0.1.0.tar.gz
  • Upload date:
  • Size: 7.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.0.tar.gz
Algorithm Hash digest
SHA256 a5d875ab0b5b32bb15a8f4edb99bf069ab855ff3057a5bd7db98f00201496cb2
MD5 4030afdcc47f110cca60a8c045123c32
BLAKE2b-256 e8be0b1014575602702f5bd94643e51b826fb72c4304b2d56c48e4656fff66da

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: py4conjoint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c90a058545f832b48d47e11ca199bce64437686382ff21c232617fc8fa229a8
MD5 84ea6709fb466860c0a631fbecf2a0da
BLAKE2b-256 1fae4991522359dc42e3c42c9a729acb831dafe4fb4739caea36c39915f4b260

See more details on using hashes here.

Provenance

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