{ "cells": [ { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Repo card metadata block was not found. Setting CardData to empty.\n" ] } ], "source": [ "from datasets import load_dataset\n", "dataset1 = load_dataset(\"nbertagnolli/counsel-chat\")" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "DatasetDict({\n", " train: Dataset({\n", " features: ['questionID', 'questionTitle', 'questionText', 'questionLink', 'topic', 'therapistInfo', 'therapistURL', 'answerText', 'upvotes', 'views'],\n", " num_rows: 2775\n", " })\n", "})" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset1" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
questionIDquestionTitlequestionTextquestionLinktopictherapistInfotherapistURLanswerTextupvotesviews
00Do I have too many issues for counseling?I have so many issues to address. I have a his...https://counselchat.com/questions/do-i-have-to...depressionJennifer MolinariHypnotherapist & Licensed Cou...https://counselchat.com/therapists/jennifer-mo...It is very common for people to have multiple ...31971
10Do I have too many issues for counseling?I have so many issues to address. I have a his...https://counselchat.com/questions/do-i-have-to...depressionJason Lynch, MS, LMHC, LCAC, ADSIndividual & C...https://counselchat.com/therapists/jason-lynch...I've never heard of someone having \"too many i...2386
20Do I have too many issues for counseling?I have so many issues to address. I have a his...https://counselchat.com/questions/do-i-have-to...depressionShakeeta TorresFaith Based Mental Health Couns...https://counselchat.com/therapists/shakeeta-to...Absolutely not.  I strongly recommending worki...23071
30Do I have too many issues for counseling?I have so many issues to address. I have a his...https://counselchat.com/questions/do-i-have-to...depressionNoorayne ChevalierMA, RP, CCC, CCAC, LLP (Mich...https://counselchat.com/therapists/noorayne-ch...Let me start by saying there are never too man...22643
40Do I have too many issues for counseling?I have so many issues to address. I have a his...https://counselchat.com/questions/do-i-have-to...depressionToni Teixeira, LCSWYour road to healing begins...https://counselchat.com/therapists/toni-teixei...I just want to acknowledge you for the courage...1256
.................................
2770939Are some clients more difficult than others?What are some difficulties that a counselor ca...https://counselchat.com/questions/are-some-cli...counseling-fundamentalsAudrey ONealBi-lingual Psychotherapist and Hea...https://counselchat.com/therapists/audrey-oneal-3Although many clients have the capacity to be ...047
2771939Are some clients more difficult than others?What are some difficulties that a counselor ca...https://counselchat.com/questions/are-some-cli...counseling-fundamentalsKaileen McMickle, MS, LPCLicensed Professional...https://counselchat.com/therapists/kaileen-mcm...I usually don't label a client as \"difficult\" ...022
2772939Are some clients more difficult than others?What are some difficulties that a counselor ca...https://counselchat.com/questions/are-some-cli...counseling-fundamentalsDr. Timothy Paul'man'; Online - \"Natural Healt...https://counselchat.com/therapists/dr-timothy-...Dang right!  :)Heh heh, and correct me if I'm ...023
2773939Are some clients more difficult than others?What are some difficulties that a counselor ca...https://counselchat.com/questions/are-some-cli...counseling-fundamentalsDavid KleinHumanistic, LGBT-Affirmative Psycho...https://counselchat.com/therapists/david-kleinYes, just like some relationships outside of o...041
2774939Are some clients more difficult than others?What are some difficulties that a counselor ca...https://counselchat.com/questions/are-some-cli...counseling-fundamentalsSherry Katz, LCSWCouples and Family Therapist,...https://counselchat.com/therapists/sherry-katz...Each counselor will have their own list of \"di...043
\n", "

2775 rows × 10 columns

\n", "
" ], "text/plain": [ " questionID questionTitle \\\n", "0 0 Do I have too many issues for counseling? \n", "1 0 Do I have too many issues for counseling? \n", "2 0 Do I have too many issues for counseling? \n", "3 0 Do I have too many issues for counseling? \n", "4 0 Do I have too many issues for counseling? \n", "... ... ... \n", "2770 939 Are some clients more difficult than others? \n", "2771 939 Are some clients more difficult than others? \n", "2772 939 Are some clients more difficult than others? \n", "2773 939 Are some clients more difficult than others? \n", "2774 939 Are some clients more difficult than others? \n", "\n", " questionText \\\n", "0 I have so many issues to address. I have a his... \n", "1 I have so many issues to address. I have a his... \n", "2 I have so many issues to address. I have a his... \n", "3 I have so many issues to address. I have a his... \n", "4 I have so many issues to address. I have a his... \n", "... ... \n", "2770 What are some difficulties that a counselor ca... \n", "2771 What are some difficulties that a counselor ca... \n", "2772 What are some difficulties that a counselor ca... \n", "2773 What are some difficulties that a counselor ca... \n", "2774 What are some difficulties that a counselor ca... \n", "\n", " questionLink \\\n", "0 https://counselchat.com/questions/do-i-have-to... \n", "1 https://counselchat.com/questions/do-i-have-to... \n", "2 https://counselchat.com/questions/do-i-have-to... \n", "3 https://counselchat.com/questions/do-i-have-to... \n", "4 https://counselchat.com/questions/do-i-have-to... \n", "... ... \n", "2770 https://counselchat.com/questions/are-some-cli... \n", "2771 https://counselchat.com/questions/are-some-cli... \n", "2772 https://counselchat.com/questions/are-some-cli... \n", "2773 https://counselchat.com/questions/are-some-cli... \n", "2774 https://counselchat.com/questions/are-some-cli... \n", "\n", " topic \\\n", "0 depression \n", "1 depression \n", "2 depression \n", "3 depression \n", "4 depression \n", "... ... \n", "2770 counseling-fundamentals \n", "2771 counseling-fundamentals \n", "2772 counseling-fundamentals \n", "2773 counseling-fundamentals \n", "2774 counseling-fundamentals \n", "\n", " therapistInfo \\\n", "0 Jennifer MolinariHypnotherapist & Licensed Cou... \n", "1 Jason Lynch, MS, LMHC, LCAC, ADSIndividual & C... \n", "2 Shakeeta TorresFaith Based Mental Health Couns... \n", "3 Noorayne ChevalierMA, RP, CCC, CCAC, LLP (Mich... \n", "4 Toni Teixeira, LCSWYour road to healing begins... \n", "... ... \n", "2770 Audrey ONealBi-lingual Psychotherapist and Hea... \n", "2771 Kaileen McMickle, MS, LPCLicensed Professional... \n", "2772 Dr. Timothy Paul'man'; Online - \"Natural Healt... \n", "2773 David KleinHumanistic, LGBT-Affirmative Psycho... \n", "2774 Sherry Katz, LCSWCouples and Family Therapist,... \n", "\n", " therapistURL \\\n", "0 https://counselchat.com/therapists/jennifer-mo... \n", "1 https://counselchat.com/therapists/jason-lynch... \n", "2 https://counselchat.com/therapists/shakeeta-to... \n", "3 https://counselchat.com/therapists/noorayne-ch... \n", "4 https://counselchat.com/therapists/toni-teixei... \n", "... ... \n", "2770 https://counselchat.com/therapists/audrey-oneal-3 \n", "2771 https://counselchat.com/therapists/kaileen-mcm... \n", "2772 https://counselchat.com/therapists/dr-timothy-... \n", "2773 https://counselchat.com/therapists/david-klein \n", "2774 https://counselchat.com/therapists/sherry-katz... \n", "\n", " answerText upvotes views \n", "0 It is very common for people to have multiple ... 3 1971 \n", "1 I've never heard of someone having \"too many i... 2 386 \n", "2 Absolutely not.  I strongly recommending worki... 2 3071 \n", "3 Let me start by saying there are never too man... 2 2643 \n", "4 I just want to acknowledge you for the courage... 1 256 \n", "... ... ... ... \n", "2770 Although many clients have the capacity to be ... 0 47 \n", "2771 I usually don't label a client as \"difficult\" ... 0 22 \n", "2772 Dang right!  :)Heh heh, and correct me if I'm ... 0 23 \n", "2773 Yes, just like some relationships outside of o... 0 41 \n", "2774 Each counselor will have their own list of \"di... 0 43 \n", "\n", "[2775 rows x 10 columns]" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from datasets import DatasetDict\n", "import numpy as np\n", "\n", "\n", "train_ds = dataset1['train']\n", "\n", "df = train_ds.to_pandas()\n", "\n", "df" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "upvotes\n", "0 1939\n", "1 506\n", "2 183\n", "3 80\n", "4 41\n", "5 13\n", "6 4\n", "7 4\n", "9 3\n", "10 1\n", "12 1\n", "Name: count, dtype: int64" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df['upvotes'].value_counts()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/rd/jwc8pz6n7t9d07lm_6zb3gc80000gn/T/ipykernel_50569/3274451497.py:12: DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.\n", " best_rows = df.groupby('questionText', group_keys=False).apply(select_best_answer)\n" ] } ], "source": [ "train_ds = dataset1['train']\n", "\n", "df = train_ds.to_pandas()\n", "# Replace NaNs in upvotes with -1 for sorting logic\n", "df['upvotes'] = df['upvotes'].fillna(-1)\n", "\n", "# Group by questionText\n", "def select_best_answer(group):\n", " # If any row has a non-negative upvote, filter those and pick max\n", " if (group['upvotes'] >= 0).any():\n", " return group.loc[group['upvotes'].idxmax()]\n", " else:\n", " return group.loc[group['views'].idxmax()]\n", "\n", "best_rows = df.groupby('questionText', group_keys=False).apply(select_best_answer)\n", "\n", "# Convert back to HuggingFace dataset if needed\n", "from datasets import Dataset\n", "best_dataset = Dataset.from_pandas(best_rows.reset_index(drop=True))\n" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
questionIDquestionTitlequestionTextquestionLinktopictherapistInfotherapistURLanswerTextupvotesviews
questionText
A few nights ago I talked to this girl I know about my self esteem issues for the first time. We talked for hours and she told me time and again that I was a great guy. She told me I was attractive, and have a great personality, etc. I really started to feel better about myself by the time I woke up the next morning. Now, though, I can't stop thinking about her, but I leave to go back to college in a few days and I go to school 4 hours away from her. So now I feel constantly depressed because even if I told her how I felt it wouldn't matter. I feel helpless and I don't know what to do.353I'm a 19 year old male with low self esteem. I...A few nights ago I talked to this girl I know ...https://counselchat.com/questions/i-m-a-19-yea...self-esteemAmy Fortney ParksChild & Adolescent Psychologi...https://counselchat.com/therapists/amy-fortney...Hey!  It takes a lot of courage to share your ...1232
A few years ago I was making love to my wife when for no known reason I lost my erection, Now I'm In my early 30s and my problem has become more and more frequent. This is causing major problems for my ego and it's diminishing my self esteem. This has resulted in ongoing depression and tearing apart my marriage. I am devastated and cannot find a cause for these issues. I am very attracted to my wife and want to express it in the bedroom like I used to. What could be causing this, and what can I do about it?11Why am I experiencing dfficulty maintaining an...A few years ago I was making love to my wife w...https://counselchat.com/questions/why-am-i-exp...depressionSherry Katz, LCSWCouples and Family Therapist,...https://counselchat.com/therapists/sherry-katz...First step always is to do a medical rule out ...1138
A friend of mine taking psychology advised I go to my doctor to check if I have major depressive disorder. I'm afraid of the consequences of doing so. If I do become diagnosed with major depressive disorder, won’t that go on my records? I will never be able to become a counselor along with a list of other things I may be prohibited from. I’m also afraid of taking any anti-depressants. This year, my doctor gave me some for a \"dislocated hip.\" I had a severe reaction and passed out moments after taking them. Everyone I know who has taken anti-depressants says it’s a bad idea all around and you’re better getting treatment without them. I’m concerned they might take me to a clinic and force me to take medication because I am unable to make decisions on my own. I’m not really suicidal, but I am not really taking care of myself either. Someone also told me they still use electroshock therapy. I’m not keen on that. I’m wondering if I am better off just getting self-help and working things out on my own. It’s just that I've been an emotional mess since I was in elementary school. I’ve graduated now and tried to stay positive and be happy, but I cannot deny I still am not good.127I'm scared to go to a doctor or take anti-depr...A friend of mine taking psychology advised I g...https://counselchat.com/questions/i-m-scared-t...depressionSherry Katz, LCSWCouples and Family Therapist,...https://counselchat.com/therapists/sherry-katz...I admire your courage for stating your view ab...1179
A girl and I were madly in love. We dated for over a year and were even talking about marriage and future plans together. She moved away for school, and we attempted a long distance relationship. We eventually broke up. It's been a year now, and I still haven't lost my feelings for her. I still love her the same way I did. I've suffered from depression ever since the breakup and have been unable to connect with anyone else. It's damaging me and my life.111I'm depressed and unable to connect with peopl...A girl and I were madly in love. We dated for ...https://counselchat.com/questions/i-m-depresse...depressionLynda MartensMarriage & Family Therapist, MSc,...https://counselchat.com/therapists/ms-lynda-ma...Hi Boise, I'm sorry that you've lost this love...2125
A lot of times, I avoid situations where I am to meet new people because I have a fear of embarrassing myself. I often avoid large groups of people, like parties, because I think they all constantly judge me.193How can I get over my fear of public embarrass...A lot of times, I avoid situations where I am ...https://counselchat.com/questions/how-can-i-ge...anxietyRobin Landwehr, DBH, LPCC, NCCMental Health in...https://counselchat.com/therapists/robin-landw...Hello, and thank you for your question. First,...1345
.................................
Why am I attracted to older men?800Why do I feel like I need a man in my life?Why am I attracted to older men?https://counselchat.com/questions/why-do-i-fee...relationshipsSherry Katz, LCSWCouples and Family Therapist,...https://counselchat.com/therapists/sherry-katz...What a wonderful question!Good for you on clea...2171
Why am I so afraid of it? I don't understand.212How can I be less afraid of rape?Why am I so afraid of it? I don't understand.https://counselchat.com/questions/how-can-i-be...anxietySherry Katz, LCSWCouples and Family Therapist,...https://counselchat.com/therapists/sherry-katz...Your fear is somewhat reasonable.  No one want...2229
With college over, my boyfriend and I have such different work schedules. Since I can't see him often, I want to talk more on the phone. He plays video games while talking to players, so often I feel ignored. I find myself always telling him what to do in relation to me, things he should know.511How can I address my grievances to my boyfriend?With college over, my boyfriend and I have suc...https://counselchat.com/questions/how-can-i-ad...intimacySherry Katz, LCSWCouples and Family Therapist,...https://counselchat.com/therapists/sherry-katz...Directly tell him what you write here.Either h...075
he just walks in the house whenever he wants to see his kids. My fiancé tells me it makes her angry and doesn't like it, but she seems afraid to say anything to him about it for some reason. Is it okay for him to do this?253My fiancé's ex-husband shows up unannouncedhe just walks in the house whenever he wants t...https://counselchat.com/questions/my-fianc-s-e...parentingFrank TheusMA, LPC, NCC, CSAThttps://counselchat.com/therapists/frank-theusThe short answer to your question is \"No\" it's...2380
i was addicted to porn since the second grade. I'm in my early 40s and overcame my addiction during my separation from my wife of 15 years.767How can I rebuild the trust I destroyed from m...i was addicted to porn since the second grade....https://counselchat.com/questions/how-can-i-re...relationshipsSonya WilsonLicensed Professional Counselorhttps://counselchat.com/therapists/sonya-wilsonThe person who can answer this question is the...0113
\n", "

865 rows × 10 columns

\n", "
" ], "text/plain": [ " questionID \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... 353 \n", "A few years ago I was making love to my wife wh... 11 \n", "A friend of mine taking psychology advised I go... 127 \n", "A girl and I were madly in love. We dated for o... 111 \n", "A lot of times, I avoid situations where I am t... 193 \n", "... ... \n", "Why am I attracted to older men? 800 \n", "Why am I so afraid of it? I don't understand. 212 \n", "With college over, my boyfriend and I have such... 511 \n", "he just walks in the house whenever he wants to... 253 \n", "i was addicted to porn since the second grade. ... 767 \n", "\n", " questionTitle \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... I'm a 19 year old male with low self esteem. I... \n", "A few years ago I was making love to my wife wh... Why am I experiencing dfficulty maintaining an... \n", "A friend of mine taking psychology advised I go... I'm scared to go to a doctor or take anti-depr... \n", "A girl and I were madly in love. We dated for o... I'm depressed and unable to connect with peopl... \n", "A lot of times, I avoid situations where I am t... How can I get over my fear of public embarrass... \n", "... ... \n", "Why am I attracted to older men? Why do I feel like I need a man in my life? \n", "Why am I so afraid of it? I don't understand. How can I be less afraid of rape? \n", "With college over, my boyfriend and I have such... How can I address my grievances to my boyfriend? \n", "he just walks in the house whenever he wants to... My fiancé's ex-husband shows up unannounced \n", "i was addicted to porn since the second grade. ... How can I rebuild the trust I destroyed from m... \n", "\n", " questionText \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... A few nights ago I talked to this girl I know ... \n", "A few years ago I was making love to my wife wh... A few years ago I was making love to my wife w... \n", "A friend of mine taking psychology advised I go... A friend of mine taking psychology advised I g... \n", "A girl and I were madly in love. We dated for o... A girl and I were madly in love. We dated for ... \n", "A lot of times, I avoid situations where I am t... A lot of times, I avoid situations where I am ... \n", "... ... \n", "Why am I attracted to older men? Why am I attracted to older men? \n", "Why am I so afraid of it? I don't understand. Why am I so afraid of it? I don't understand. \n", "With college over, my boyfriend and I have such... With college over, my boyfriend and I have suc... \n", "he just walks in the house whenever he wants to... he just walks in the house whenever he wants t... \n", "i was addicted to porn since the second grade. ... i was addicted to porn since the second grade.... \n", "\n", " questionLink \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... https://counselchat.com/questions/i-m-a-19-yea... \n", "A few years ago I was making love to my wife wh... https://counselchat.com/questions/why-am-i-exp... \n", "A friend of mine taking psychology advised I go... https://counselchat.com/questions/i-m-scared-t... \n", "A girl and I were madly in love. We dated for o... https://counselchat.com/questions/i-m-depresse... \n", "A lot of times, I avoid situations where I am t... https://counselchat.com/questions/how-can-i-ge... \n", "... ... \n", "Why am I attracted to older men? https://counselchat.com/questions/why-do-i-fee... \n", "Why am I so afraid of it? I don't understand. https://counselchat.com/questions/how-can-i-be... \n", "With college over, my boyfriend and I have such... https://counselchat.com/questions/how-can-i-ad... \n", "he just walks in the house whenever he wants to... https://counselchat.com/questions/my-fianc-s-e... \n", "i was addicted to porn since the second grade. ... https://counselchat.com/questions/how-can-i-re... \n", "\n", " topic \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... self-esteem \n", "A few years ago I was making love to my wife wh... depression \n", "A friend of mine taking psychology advised I go... depression \n", "A girl and I were madly in love. We dated for o... depression \n", "A lot of times, I avoid situations where I am t... anxiety \n", "... ... \n", "Why am I attracted to older men? relationships \n", "Why am I so afraid of it? I don't understand. anxiety \n", "With college over, my boyfriend and I have such... intimacy \n", "he just walks in the house whenever he wants to... parenting \n", "i was addicted to porn since the second grade. ... relationships \n", "\n", " therapistInfo \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... Amy Fortney ParksChild & Adolescent Psychologi... \n", "A few years ago I was making love to my wife wh... Sherry Katz, LCSWCouples and Family Therapist,... \n", "A friend of mine taking psychology advised I go... Sherry Katz, LCSWCouples and Family Therapist,... \n", "A girl and I were madly in love. We dated for o... Lynda MartensMarriage & Family Therapist, MSc,... \n", "A lot of times, I avoid situations where I am t... Robin Landwehr, DBH, LPCC, NCCMental Health in... \n", "... ... \n", "Why am I attracted to older men? Sherry Katz, LCSWCouples and Family Therapist,... \n", "Why am I so afraid of it? I don't understand. Sherry Katz, LCSWCouples and Family Therapist,... \n", "With college over, my boyfriend and I have such... Sherry Katz, LCSWCouples and Family Therapist,... \n", "he just walks in the house whenever he wants to... Frank TheusMA, LPC, NCC, CSAT \n", "i was addicted to porn since the second grade. ... Sonya WilsonLicensed Professional Counselor \n", "\n", " therapistURL \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... https://counselchat.com/therapists/amy-fortney... \n", "A few years ago I was making love to my wife wh... https://counselchat.com/therapists/sherry-katz... \n", "A friend of mine taking psychology advised I go... https://counselchat.com/therapists/sherry-katz... \n", "A girl and I were madly in love. We dated for o... https://counselchat.com/therapists/ms-lynda-ma... \n", "A lot of times, I avoid situations where I am t... https://counselchat.com/therapists/robin-landw... \n", "... ... \n", "Why am I attracted to older men? https://counselchat.com/therapists/sherry-katz... \n", "Why am I so afraid of it? I don't understand. https://counselchat.com/therapists/sherry-katz... \n", "With college over, my boyfriend and I have such... https://counselchat.com/therapists/sherry-katz... \n", "he just walks in the house whenever he wants to... https://counselchat.com/therapists/frank-theus \n", "i was addicted to porn since the second grade. ... https://counselchat.com/therapists/sonya-wilson \n", "\n", " answerText \\\n", "questionText \n", "A few nights ago I talked to this girl I know a... Hey!  It takes a lot of courage to share your ... \n", "A few years ago I was making love to my wife wh... First step always is to do a medical rule out ... \n", "A friend of mine taking psychology advised I go... I admire your courage for stating your view ab... \n", "A girl and I were madly in love. We dated for o... Hi Boise, I'm sorry that you've lost this love... \n", "A lot of times, I avoid situations where I am t... Hello, and thank you for your question. First,... \n", "... ... \n", "Why am I attracted to older men? What a wonderful question!Good for you on clea... \n", "Why am I so afraid of it? I don't understand. Your fear is somewhat reasonable.  No one want... \n", "With college over, my boyfriend and I have such... Directly tell him what you write here.Either h... \n", "he just walks in the house whenever he wants to... The short answer to your question is \"No\" it's... \n", "i was addicted to porn since the second grade. ... The person who can answer this question is the... \n", "\n", " upvotes views \n", "questionText \n", "A few nights ago I talked to this girl I know a... 1 232 \n", "A few years ago I was making love to my wife wh... 1 138 \n", "A friend of mine taking psychology advised I go... 1 179 \n", "A girl and I were madly in love. We dated for o... 2 125 \n", "A lot of times, I avoid situations where I am t... 1 345 \n", "... ... ... \n", "Why am I attracted to older men? 2 171 \n", "Why am I so afraid of it? I don't understand. 2 229 \n", "With college over, my boyfriend and I have such... 0 75 \n", "he just walks in the house whenever he wants to... 2 380 \n", "i was addicted to porn since the second grade. ... 0 113 \n", "\n", "[865 rows x 10 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "best_rows" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# https://huggingface.co/datasets/Amod/mental_health_counseling_conversations\n", "import pandas as pd\n", "# Login using e.g. `huggingface-cli login` to access this dataset\n", "df = pd.read_json(\n", " \"data/combined_dataset.json\", lines=True\n", ")\n" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'Context': \"I'm going through some things with my feelings and myself. I barely sleep and I do nothing but think about how I'm worthless and how I shouldn't be here.\\n I've never tried or contemplated suicide. I've always wanted to fix my issues, but I never get around to it.\\n How can I change my feeling of being worthless to everyone?\", 'Response': \"If everyone thinks you're worthless, then maybe you need to find new people to hang out with.Seriously, the social context in which a person lives is a big influence in self-esteem.Otherwise, you can go round and round trying to understand why you're not worthless, then go back to the same crowd and be knocked down again.There are many inspirational messages you can find in social media. \\xa0Maybe read some of the ones which state that no person is worthless, and that everyone has a good purpose to their life.Also, since our culture is so saturated with the belief that if someone doesn't feel good about themselves that this is somehow terrible.Bad feelings are part of living. \\xa0They are the motivation to remove ourselves from situations and relationships which do us more harm than good.Bad feelings do feel terrible. \\xa0 Your feeling of worthlessness may be good in the sense of motivating you to find out that you are much better than your feelings today.\"}\n" ] } ], "source": [ "data = []\n", "with open(\"data/combined_dataset.json\", \"r\") as f:\n", " for line in f:\n", " data.append(json.loads(line))\n", "\n", "# Example: print one record\n", "print(data[0])" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ContextResponse
0I'm going through some things with my feelings...If everyone thinks you're worthless, then mayb...
1I'm going through some things with my feelings...Hello, and thank you for your question and see...
2I'm going through some things with my feelings...First thing I'd suggest is getting the sleep y...
3I'm going through some things with my feelings...Therapy is essential for those that are feelin...
4I'm going through some things with my feelings...I first want to let you know that you are not ...
.........
3507My grandson's step-mother sends him to school ...Absolutely not! It is never in a child's best ...
3508My boyfriend is in recovery from drug addictio...I'm sorry you have tension between you and you...
3509The birth mother attempted suicide several tim...The true answer is, \"no one can really say wit...
3510I think adult life is making him depressed and...How do you help yourself to believe you requir...
3511I just took a job that requires me to travel f...hmm this is a tough one!
\n", "

3512 rows × 2 columns

\n", "
" ], "text/plain": [ " Context \\\n", "0 I'm going through some things with my feelings... \n", "1 I'm going through some things with my feelings... \n", "2 I'm going through some things with my feelings... \n", "3 I'm going through some things with my feelings... \n", "4 I'm going through some things with my feelings... \n", "... ... \n", "3507 My grandson's step-mother sends him to school ... \n", "3508 My boyfriend is in recovery from drug addictio... \n", "3509 The birth mother attempted suicide several tim... \n", "3510 I think adult life is making him depressed and... \n", "3511 I just took a job that requires me to travel f... \n", "\n", " Response \n", "0 If everyone thinks you're worthless, then mayb... \n", "1 Hello, and thank you for your question and see... \n", "2 First thing I'd suggest is getting the sleep y... \n", "3 Therapy is essential for those that are feelin... \n", "4 I first want to let you know that you are not ... \n", "... ... \n", "3507 Absolutely not! It is never in a child's best ... \n", "3508 I'm sorry you have tension between you and you... \n", "3509 The true answer is, \"no one can really say wit... \n", "3510 How do you help yourself to believe you requir... \n", "3511 hmm this is a tough one! \n", "\n", "[3512 rows x 2 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "tellme_env (3.13.5)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.5" } }, "nbformat": 4, "nbformat_minor": 2 }