{
  "id": 400509,
  "title": "How to read the hidden test dataset when submitting?",
  "url": "/competitions/tlvmc-parkinsons-freezing-gait-prediction/discussion/400509",
  "author_name": "",
  "post_date": "2023-04-08T17:51:48.942529Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hello,<br>\nI am fairly new to kaggle and would like to submit a notebook to the competition. The problem is I can't find information anywhere on what the hidden test dataset that will be named/where it will be located so my script can actually access it. So my question is what is the name of the file that will be passed to my program?</p>",
  "messages": [
    {
      "id": "2214737",
      "postDate": "04/08/2023 17:51:48",
      "content": "<p>Hello,<br>\nI am fairly new to kaggle and would like to submit a notebook to the competition. The problem is I can't find information anywhere on what the hidden test dataset that will be named/where it will be located so my script can actually access it. So my question is what is the name of the file that will be passed to my program?</p>",
      "rawMarkdown": "Hello,\nI am fairly new to kaggle and would like to submit a notebook to the competition. The problem is I can't find information anywhere on what the hidden test dataset that will be named/where it will be located so my script can actually access it. So my question is what is the name of the file that will be passed to my program?",
      "votes": null
    },
    {
      "id": "2214782",
      "postDate": "04/08/2023 18:43:49",
      "content": "<p>Hey Renee,</p>\n<p>Since we do not know the names of the files, we need to make our code more general.  There are some example notebooks under the code tab in the competition that can be helpful.</p>\n<p>Here is some code from one of my notebooks when I tested my submission format.  Not the most efficient thing in the world but was necessary for some of the feature engineering I wanted to try.  There are ways to read in files with the pandas library as well.</p>\n<pre><code>\n numpy  np \n pandas  pd \n os\n csv\n\ntestTDCSFOG_path = \n\n\n()\n dirname, _, filenames  os.walk(testTDCSFOG_path):\n     filename  filenames:\n        (my_files_path+filename)\n         = filename[:-] \n        f_testTDCS_List = [] \n         (testTDCSFOG_path+filename)  file_obj:\n            heading = (file_obj)\n            reader_obj = csv.reader(file_obj)   \n            \n             row  reader_obj:\n                id_t = () +  + (row[])\n                row.append(id_t)\n                f_testTDCS_List.append(row)\n        \n        [....other stuff depending on what yo</code></pre>\n<p>You'll also have to read in the DEFOG data.</p>",
      "rawMarkdown": "Hey Renee,\n\nSince we do not know the names of the files, we need to make our code more general.  There are some example notebooks under the code tab in the competition that can be helpful.\n\nHere is some code from one of my notebooks when I tested my submission format.  Not the most efficient thing in the world but was necessary for some of the feature engineering I wanted to try.  There are ways to read in files with the pandas library as well.\n\n```python\n# Import Libraries:\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport os\nimport csv\n\ntestTDCSFOG_path = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test/tdcsfog/'\n            \n#Read/Process test data:\nprint('Creating test TDCS list...')\nfor dirname, _, filenames in os.walk(testTDCSFOG_path):\n    for filename in filenames:\n        print(my_files_path+filename)\n        id = filename[:-4] #removes trailing .csv\n        f_testTDCS_List = [] #file specific list, add elements to a main list later\n        with open(testTDCSFOG_path+filename) as file_obj:\n            heading = next(file_obj)\n            reader_obj = csv.reader(file_obj)   \n            # Iterate over each row in the csv file:\n            for row in reader_obj:\n                id_t = str(id) + \"_\" + str(row[0])\n                row.append(id_t)\n                f_testTDCS_List.append(row)\n        #Feature engineering now begins for the file:\n        [....other stuff depending on what you'd like to do]\n\n```\n\nYou'll also have to read in the DEFOG data.",
      "votes": null
    },
    {
      "id": "2216302",
      "postDate": "04/10/2023 01:24:03",
      "content": "<p>Thank you, I think I've got it working!</p>",
      "rawMarkdown": "Thank you, I think I've got it working!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2214782,
      "author_name": "austinhinkel",
      "author_url": "",
      "post_date": "04/08/2023 18:43:49",
      "content": "<p>Hey Renee,</p>\n<p>Since we do not know the names of the files, we need to make our code more general.  There are some example notebooks under the code tab in the competition that can be helpful.</p>\n<p>Here is some code from one of my notebooks when I tested my submission format.  Not the most efficient thing in the world but was necessary for some of the feature engineering I wanted to try.  There are ways to read in files with the pandas library as well.</p>\n<pre><code>\n numpy  np \n pandas  pd \n os\n csv\n\ntestTDCSFOG_path = \n\n\n()\n dirname, _, filenames  os.walk(testTDCSFOG_path):\n     filename  filenames:\n        (my_files_path+filename)\n         = filename[:-] \n        f_testTDCS_List = [] \n         (testTDCSFOG_path+filename)  file_obj:\n            heading = (file_obj)\n            reader_obj = csv.reader(file_obj)   \n            \n             row  reader_obj:\n                id_t = () +  + (row[])\n                row.append(id_t)\n                f_testTDCS_List.append(row)\n        \n        [....other stuff depending on what yo</code></pre>\n<p>You'll also have to read in the DEFOG data.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2216302,
          "author_name": "reneeschmidt",
          "author_url": "",
          "post_date": "04/10/2023 01:24:03",
          "content": "<p>Thank you, I think I've got it working!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2214737": "Hello,\nI am fairly new to kaggle and would like to submit a notebook to the competition. The problem is I can't find information anywhere on what the hidden test dataset that will be named/where it will be located so my script can actually access it. So my question is what is the name of the file that will be passed to my program?",
    "2214782": "Hey Renee,\n\nSince we do not know the names of the files, we need to make our code more general.  There are some example notebooks under the code tab in the competition that can be helpful.\n\nHere is some code from one of my notebooks when I tested my submission format.  Not the most efficient thing in the world but was necessary for some of the feature engineering I wanted to try.  There are ways to read in files with the pandas library as well.\n\n```python\n# Import Libraries:\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport os\nimport csv\n\ntestTDCSFOG_path = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test/tdcsfog/'\n            \n#Read/Process test data:\nprint('Creating test TDCS list...')\nfor dirname, _, filenames in os.walk(testTDCSFOG_path):\n    for filename in filenames:\n        print(my_files_path+filename)\n        id = filename[:-4] #removes trailing .csv\n        f_testTDCS_List = [] #file specific list, add elements to a main list later\n        with open(testTDCSFOG_path+filename) as file_obj:\n            heading = next(file_obj)\n            reader_obj = csv.reader(file_obj)   \n            # Iterate over each row in the csv file:\n            for row in reader_obj:\n                id_t = str(id) + \"_\" + str(row[0])\n                row.append(id_t)\n                f_testTDCS_List.append(row)\n        #Feature engineering now begins for the file:\n        [....other stuff depending on what you'd like to do]\n\n```\n\nYou'll also have to read in the DEFOG data.",
    "2216302": "Thank you, I think I've got it working!"
  },
  "source": "meta"
}