avatarThe Writrix

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1238

Abstract

me Python code to retrieve Tesla stock prices from 2022 using Yahoo Finance. I want the output to be in a csv file called ‘stock_prices.csv’ The CSV file mys have a column named “Date” representing the dates and a column named “Price” representing the stock prices.”</p><p id="e110">And then the output will be:</p><figure id="f70f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4cgK5TnDtjHmV_MaFnGNCw.png"><figcaption></figcaption></figure><h1 id="df02">Step 2: Copy this code using the botton “copy code” at the top right</h1><h1 id="f854">Step 3: Paste the code in Google Colab</h1><p id="38fa">Navigate to <a href="https://colab.research.google.com/">https://colab.research.google.com/</a> . The create a new notebook by logging in using your Google account.</p><p id="0eee">This is the full code I got from Chat GPT.</p><p id="77be">But remember, you can customise the prompt to get any other stock.</p><div id="eeb1"><pre><span class="hljs-keyword">import</span> yfinance <span class="hljs-keyword">as</span> yf <span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd

<span class="hljs-comment"># Define the stock symbol and the time range for which you want the data</span> sym

Options

bol = <span class="hljs-string">"TSLA"</span> start_date = <span class="hljs-string">"2022-01-01"</span> end_date = <span class="hljs-string">"2022-12-31"</span>

<span class="hljs-comment"># Fetch the stock data using Yahoo Finance</span> stock_data = yf.download(symbol, start=start_date, end=end_date)

<span class="hljs-comment"># Extract the 'Date' and 'Close' columns from the stock data</span> stock_data = stock_data[[<span class="hljs-string">'Close'</span>]].reset_index()

<span class="hljs-comment"># Rename the columns to 'Date' and 'Price'</span> stock_data.columns = [<span class="hljs-string">'Date'</span>, <span class="hljs-string">'Price'</span>]

<span class="hljs-comment"># Save the stock data to a CSV file</span> stock_data.to_csv(<span class="hljs-string">'stock_prices.csv'</span>, index=<span class="hljs-literal">False</span>)

<span class="hljs-built_in">print</span>(<span class="hljs-string">"Stock data saved to 'stock_prices.csv'"</span>)</pre></div><h1 id="dbca">Step 4: Use the CSV file with the stock data</h1><p id="db5f">As simple as that!</p><figure id="4c88"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*lpNgMNRzr3oNIaAX.png"><figcaption></figcaption></figure></article></body>

My Top Ten Words to Use in Your Writing — Part 2

Go on, I dare you!

Hopefully you’ve had a chance to use at least one of the previous five words I introduced last time in your writing or conversation.

If not, here they are:

And now for the remaining five words.

#6 — Slubberdegullion

A Slubberdegullion is a dirty rascal, a scoundrel or a wretch.

AI Generated Image

The word was commonly used in the early nineteen hundreds and I found a quaint example of its use in an Australian country newspaper in 1929.

In a Letter to the Editor, the writer complains of a pleasant evening at the theatre ruined by a group of slubberdegullions:

“People go to the Theatre to see the pictures, not to hear the hootings, howlings, and cat-calls of a gang of slubberdegullions. From their conduct it would seem that they had indulged somewhat freely, and they keep lumbering up and down the stairs, apparently to get more drink, to the annoyance of all the patrons.”

Some things, it seems, never change!

#7 — Meretricious Persiflage

Another ripper phrase. It describes frivolous, light, flippant, bantering talk.

Have you indulged in any meretricious persiflage lately? I confess to being guilty of it and, quite often, according to my dear husband.

“Now go away then, and leave me alone. I don’t want any more of your meretricious persiflage.” D H Lawrence, Women in Love

I fell in love with this phrase many years ago while reading Lawrence and it’s stuck with me ever since. I’m dying to use it in my writing… somewhere!

Illustration by yupiramos

#8 — Snickersee

While this word might sound like a particularly enticing type of candy, I can assure you, it’s not.

A Snickersee is a large sword-like knife, especially one used as a weapon. It is also used to describe the activity of engaging in cut-and-thrust fighting with knives.

I found an amusing reference to the use of a Snickersee in a South Australian newspaper during a Test Cricket match between Australia and England in 1936. The caption reads: “The Lord High Executioner, in the form of the Test cricket selectors, will probably find it necessary to use his snickersee before the end of the Test season.”

Cartoon from The News, Adelaide on 23 December 1936

#9 — Tallywags

Can you guess this one?

A Tallywag is old-fashioned slang for a man’s testicle, so I won’t include an image in case Medium ban me 😉. (I also found a more modern use of the word written as Tally-Wag, a house where a large group of people sit around all day sniffing paint and glue fumes.)

As a writer of historical fiction, I used this word in my story, An Abnormal Woman, an historical novel, where one of the protagonists encounters a domestic violence incident while working in the Melbourne city slums:

“…The object of the woman’s tirade was a thin young man with heavy-lidded eyes and a weak, gormless face.

“You bastard!” she screamed, whereupon a volley of profanities burst from her mouth.

Intoxicated customers from the adjacent public house spilled onto the street still carrying their glasses to gawk at the scantily clad woman causing the ruckus. The youth, embarrassed at his sudden elevation to infamy, edged towards the gate but the redhead darted towards her lover and clawed his face.

Lines of blood sprouted on his left cheek as he wrenched the woman’s hands from his face and held her wrists trying to still her flaying arms. The couple wrestled together in a grotesque dance amidst the drunken guffaws of the watching crowd.

“Watch your tallywags, Johnny-boy! She might try to cut them off while you’re asleep!” someone called…”

#10 — Merkin

Last, but definitely not least, is the Merkin.

The Merkin is a pubic ‘wig’ and dates back to the 1450s, beloved by women who’d had their pubic hair shaved to eradicate lice.

Merkins were also used by sex workers to cover evidence of sexually transmitted diseases. Sometimes the sex workers used them as a type of ‘decoration’ when displaying their finer points to prospective clients.

I managed to find a picture of a Pubic Wig Seller in the 1800s… change of career anybody?

1860 Photo of a Merkin Merchant — note inscription on his case: “Serving the Discerning Pudendum Since 1827”

One thing’s for sure: This gentleman is unlikely to put any of the XXX Wax beauticians out of business!

I hope I’ve managed to inspire you and expand your vocabulary with these words.

Good luck with using them in your writing! 😉

Writing
Writing Tips
Humor
Language
History
Recommended from ReadMedium