Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Python Hi was given this code

Charles

New Coder
with open('my_brisnet_file.txt', 'r') as f: I am trying to import a pdf file downloaded from a website and put it into a google sheet for data manipulation and to build a template for my personal use and to speed up a process I am working on. This is a copy of the e:mail and I am confused because I have tried to implement this and it is not working. This is the email. I am confused here as I understand I have to change the name of the file but would be so grateful if someone could write #1 step until finish because I have taken the pdf file and converted it a csv file, my confusion lies on when to copy and paste.?????????
To use the Python code, you'll need to follow these steps:

1. Save your Brisnet file as a text file (e.g. "brisnet_file.txt") and save it in the same directory as the Python code.

2. Open a text editor (such as Notepad or Sublime Text) and copy/paste the first Python code into a new file.

3. Edit the file name in the code to match the name of your Brisnet file. For example, if your Brisnet file is named "my_brisnet_file.txt", you would change the following line:

with open('brisnet_file.txt', 'r') as f:​

to:

with open('my_brisnet_file.txt', 'r') as f:​

1. Save the Python file with a new name, such as "brisnet_to_csv.py"

2. Open a command prompt or terminal window and navigate to the directory where you saved the Python file and the Brisnet file.

3. Run the Python code by typing "python brisnet_to_csv.py" and pressing Enter.

4. The CSV file will be created in the same directory as the Python file.

You can follow a similar process to convert your Daily Racing Form file to CSV format using the second Python code. Once you have both CSV files, you can import them into Google Sheets as described in my previous response.
 
with open('my_brisnet_file.txt', 'r') as f: I am trying to import a pdf file downloaded from a website and put it into a google sheet for data manipulation and to build a template for my personal use and to speed up a process I am working on. This is a copy of the e:mail and I am confused because I have tried to implement this and it is not working. This is the email. I am confused here as I understand I have to change the name of the file but would be so grateful if someone could write #1 step until finish because I have taken the pdf file and converted it a csv file, my confusion lies on when to copy and paste.?????????
To use the Python code, you'll need to follow these steps:

1. Save your Brisnet file as a text file (e.g. "brisnet_file.txt") and save it in the same directory as the Python code.

2. Open a text editor (such as Notepad or Sublime Text) and copy/paste the first Python code into a new file.

3. Edit the file name in the code to match the name of your Brisnet file. For example, if your Brisnet file is named "my_brisnet_file.txt", you would change the following line:

with open('brisnet_file.txt', 'r') as f:​

to:

with open('my_brisnet_file.txt', 'r') as f:​

1. Save the Python file with a new name, such as "brisnet_to_csv.py"

2. Open a command prompt or terminal window and navigate to the directory where you saved the Python file and the Brisnet file.

3. Run the Python code by typing "python brisnet_to_csv.py" and pressing Enter.

4. The CSV file will be created in the same directory as the Python file.

You can follow a similar process to convert your Daily Racing Form file to CSV format using the second Python code. Once you have both CSV files, you can import them into Google Sheets as described in my previous response.
Hi there,
Can you provide the code you have already attempted that way the community can see and help?
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom