Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Not Found Error #7077

Closed
Rabiyeganeh opened this issue Sep 27, 2023 · 5 comments
Closed

File Not Found Error #7077

Rabiyeganeh opened this issue Sep 27, 2023 · 5 comments
Labels
bug status:Needs Triage Applied to issues that need triage

Comments

@Rabiyeganeh
Copy link

Description

Reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error '...'

Expected behavior

Context

  • Operating System and version:
  • Browser and version:
  • Jupyter Notebook version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter notebook` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
@Rabiyeganeh Rabiyeganeh added bug status:Needs Triage Applied to issues that need triage labels Sep 27, 2023
@Rabiyeganeh
Copy link
Author

Hi Guys,
I am new in data analysis practice. I want to put multiple csv files in a single data frame. But
I get the following error. I appreciate any suggestions.

issue1

issue2
issue3

@RRosio
Copy link
Collaborator

RRosio commented Oct 3, 2023

Hi @Rabiyeganeh thank you for opening this issue. Have you tried using a relative path rather than the absolute path you are using in the second cell?

Additionally, this repository is intended to receive issues concerning bugs, regressions, enhancement requests etc. pertaining to the Notebook application. The better place to post a question like this would be in a Discourse thread or Gitter.

@Mat-Algo
Copy link

Mat-Algo commented Oct 5, 2023

Hello @Rabiyeganeh , thankyou for opening this issue. You can try the following:

import os
import pandas as pd

directory_path = '' #specify the directory

# list to store dataframe
dataframes = []

for filename in os.listdir(directory_path):
    if filename.endswith('.csv'):
        file_path = os.path.join(directory_path, filename)
        df = pd.read_csv(file_path)
        dataframes.append(df)


combined_df = pd.concat(dataframes, ignore_index=True)

@Rabiyeganeh
Copy link
Author

Hi @Rabiyeganeh thank you for opening this issue. Have you tried using a relative path rather than the absolute path you are using in the second cell?

Additionally, this repository is intended to receive issues concerning bugs, regressions, enhancement requests etc. pertaining to the Notebook application. The better place to post a question like this would be in a Discourse thread or Gitter.

Hi @RRosio
thank you for your suggestions. I tried relative path but again something went wrong. Also thanks for introducing Gitter and Discourse thread.

@Rabiyeganeh
Copy link
Author

Hello @Rabiyeganeh , thankyou for opening this issue. You can try the following:

import os
import pandas as pd

directory_path = '' #specify the directory

# list to store dataframe
dataframes = []

for filename in os.listdir(directory_path):
    if filename.endswith('.csv'):
        file_path = os.path.join(directory_path, filename)
        df = pd.read_csv(file_path)
        dataframes.append(df)


combined_df = pd.concat(dataframes, ignore_index=True)

Hello @Mat-Algo
Thank you so much for your effective solution. It worked.
Bests

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug status:Needs Triage Applied to issues that need triage
Projects
None yet
Development

No branches or pull requests

3 participants