#๐Ÿ”’ get data

42 messages ยท Page 1 of 1 (latest)

ancient torrent
#

hi so

peak lakeBOT
#

@ancient torrent

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

ancient torrent
#

can someone help me get all this data

#

take the first two lines of numbers for example

#

I wanna get 0.03, 0.04 and make them into 0.03 0.04

#

then for the middle row for example I want 0.01 0.02

#

how can I effectively do this?

pliant lantern
#

What have you tried so far?

ancient torrent
#

well I tried asking chat gpt to organize it but to no avail

#

I tried with a small sample size doing this

#
data = ""
result = data.replace(',', '\n')

print(result)

#

I asked chat gpt to put a comma after every % and then ran that ^

pliant lantern
#

Are you familiar with Python?

ancient torrent
#

yeah

pliant lantern
#

!d csv

peak lakeBOT
#
csv

Source code: Lib/csv.py

The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180. The lack of a well-defined standard means that subtle differences often exist in the data produced and consumed by different applications. These differences can make it annoying to process CSV files from multiple sources. Still, while the delimiters and quoting characters vary, the overall format is similar enough that it is possible to write a single module which can efficiently manipulate such data, hiding the details of reading and writing the data from the programmer.

ancient torrent
#

I wanna put these all into a google sheet

#

I'm just using python kus idk how else I can deal with all that data

#

I just need everything to be separated by a space so I can easily copy paste into google sheets

pliant lantern
#

!pip gspread

peak lakeBOT
pliant lantern
#

You can do what you want directly from Python. It involves some setup though (you have to get an API key and some other stuff)

ancient torrent
#

honestly the time spent manually doing all of this I could just go through the entire pastebin and manually input them all into google sheet

#

is there no way I can quickly achieve what I want?

pliant lantern
#

Very quickly using that module

ancient torrent
pliant lantern
#

Yeah it's pretty straightforward

ancient torrent
#

is there any other way

pliant lantern
#

What do you mean?

ancient torrent
#

I have data that I scrape in real time through python and put into a google sheet by hand so that module might be able to help but it'd be much quicker rn if I don't learn that module even if it's straight forward

#

I just want that pastebin in my google sheet

ancient torrent
#

idk how to get every third number

#

if I can get every third number for example I can just print that and copy paste it

formal wasp
#

buddie uses chatgpt

#

go learn code mf

ancient torrent
#

I'm just gonna try and do what you said @pliant lantern it might take longer but ima have to learn gspread anyways later on

#

thanks for the help

#

!close

peak lakeBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.