Create an account


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,318
» Latest member: jordanmccann
» Forum threads: 21,973
» Forum posts: 22,880

Full Statistics

Online Users
There are currently 658 online users.
» 6 Member(s) | 646 Guest(s)
Applebot, Baidu, Bing, DuckDuckGo, Google, Yandex, Bbenbeckman5, cletus.ohara, ghunhtang45, gregg, livia0, Starknowledge

 
  [Tut] Python Join List of DataFrames
Posted by: xSicKxBot - 06-16-2020, 07:16 AM - Forum: Python - No Replies

Python Join List of DataFrames

To join a list of DataFrames, say dfs, use the pandas.concat(dfs) function that merges an arbitrary number of DataFrames to a single one.

When browsing StackOverflow, I recently stumbled upon the following interesting problem. By thinking about solutions to those small data science problems, you can improve your data science skills, so let’s dive into the problem description.

Problem: Given a list of Pandas DataFrames. How to merge them into a single DataFrame?

Example: You have the list of Pandas DataFrames:

df1 = pd.DataFrame({'Alice' : [18, 'scientist', 24000], 'Bob' : [24, 'student', 12000]})
df2 = pd.DataFrame({'Alice' : [19, 'scientist', 25000], 'Bob' : [25, 'student', 11000]})
df3 = pd.DataFrame({'Alice' : [20, 'scientist', 26000], 'Bob' : [26, 'student', 10000]}) # List of DataFrames
dfs = [df1, df2, df3]

Say, you want to get the following DataFrame:

 Alice Bob
0 18 24
1 scientist student
2 24000 12000
0 19 25
1 scientist student
2 25000 11000
0 20 26
1 scientist student
2 26000 10000

You can try the solution quickly in our interactive Python shell:

Exercise: Print the resulting DataFrame. Run the code. Which merging strategy is used?

Method 1: Pandas Concat


This is the easiest and most straightforward way to concatenate multiple DataFrames.

import pandas as pd df1 = pd.DataFrame({'Alice' : [18, 'scientist', 24000], 'Bob' : [24, 'student', 12000]})
df2 = pd.DataFrame({'Alice' : [19, 'scientist', 25000], 'Bob' : [25, 'student', 11000]})
df3 = pd.DataFrame({'Alice' : [20, 'scientist', 26000], 'Bob' : [26, 'student', 10000]}) # list of dataframes
dfs = [df1, df2, df3] df = pd.concat(dfs)

This generates the following output:

print(df) ''' Alice Bob
0 18 24
1 scientist student
2 24000 12000
0 19 25
1 scientist student
2 25000 11000
0 20 26
1 scientist student
2 26000 10000 '''

The resulting DataFrames contains all original data from all three DataFrames.

Method 2: Reduce + DataFrame Merge


The following method uses the reduce function to repeatedly merge together all dictionaries in the list (no matter its size). To merge two dictionaries, the df.merge() method is used. You can use several merging strategies—in the example, you use "outer":

import pandas as pd df1 = pd.DataFrame({'Alice' : [18, 'scientist', 24000], 'Bob' : [24, 'student', 12000]})
df2 = pd.DataFrame({'Alice' : [19, 'scientist', 25000], 'Bob' : [25, 'student', 11000]})
df3 = pd.DataFrame({'Alice' : [20, 'scientist', 26000], 'Bob' : [26, 'student', 10000]}) # list of dataframes
dfs = [df1, df2, df3] # Method 2
from functools import reduce
df = reduce(lambda df1, df2: df1.merge(df2, "outer"), dfs)

This generates the following output:

print(df) ''' Alice Bob
0 18 24
1 scientist student
2 24000 12000
3 19 25
4 25000 11000
5 20 26
6 26000 10000 '''

You can find a discussion of the different merge strategies here. If you’d use the parameter "inner", you’d obtain the following result:

 Alice Bob
0 scientist student

Where to Go From Here?


Enough theory, let’s get some practice!

To become successful in coding, you need to get out there and solve real problems for real people. That’s how you can become a six-figure earner easily. And that’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?

Practice projects is how you sharpen your saw in coding!

Do you want to become a code master by focusing on practical code projects that actually earn you money and solve problems for people?

Then become a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.

Join my free webinar “How to Build Your High-Income Skill Python” and watch how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!



https://www.sickgaming.net/blog/2020/06/...ataframes/

Print this item

  (Indie Deal) Ubisoft Summer Sale & Harry Potter GalaQuiz
Posted by: xSicKxBot - 06-16-2020, 07:16 AM - Forum: Deals or Specials - No Replies

Ubisoft Summer Sale & Harry Potter GalaQuiz

Ubisoft Summer Sale, up to -80% (EMEA Only)
[www.indiegala.com]
More Exit Limbo News coming soon
https://store.steampowered.com/app/1051900/Exit_Limbo_Opening/
The 189th GalaQuiz will be LIVE soon, win up to $50:dollars: in GalaCredit!
[www.indiegala.com]
The GalaQuiz will take place in less than 10 minutes from this announcement
Today's GalaQuiz[www.indiegala.com] hints are up. The theme will be Harry Potter (and the Philosopher's Stone). Today's quiz was prepared by one of our dedicated and involved community members.

Happy Hour: Brother's Path Bundle
[www.indiegala.com]

Stay Inside, Stay Safe and Enjoy Good Games.
Check out IndieGala on Twitter, YouTube & Facebook[www.facebook.com]


https://steamcommunity.com/groups/indieg...3170253213

Print this item

  PICO-8 Fantasy Console
Posted by: xSicKxBot - 06-16-2020, 03:12 AM - Forum: Game Development - No Replies

PICO-8 Fantasy Console

PICO-8 is perhaps the most popular of the fantasy consoles and if you are extremely quick, you can pick it up as part of the Itch.io Racial Justice bundle along with a ton of other development tools and indie games.  PICO-8 is described as:

PICO-8 is a fantasy console for making, sharing and playing tiny games and other computer programs. It feels like a regular console, but runs on Windows / Mac / Linux. When you turn it on, the machine greets you with a commandline, a suite of cartridge creation tools, and an online cartridge browser called SPLORE.

It emulates a very limited virtual machine:

Display
128×128 16 colours

Cartridge Size
32k

Sound
4 channel chip blerps

Code
Lua

Sprites
256 8×8 sprites

Map
128×32 cels

Additionally PICO-8 has several built in tools including a sprite editor, sound editor, level editor and music editor, as well as tools for publishing and sharing your creations with out.  The underlying programming language is Lua and is documented here.  You can check out PICO-8 in action in the video below.

GameDev News




https://www.sickgaming.net/blog/2020/06/...y-console/

Print this item

  AppleInsider - Nomad launches 20% off sitewide sale for Father’s Day
Posted by: xSicKxBot - 06-16-2020, 03:12 AM - Forum: Apples Mac and OS X - No Replies

Nomad launches 20% off sitewide sale for Father’s Day

Popular accessory maker Nomad is knocking 20% off chargers, cases and cables for your Apple Watch, MacBook Pro, AirPods, iPhone and more with a special Father’s Day coupon.

Save 20% on Nomad accessories for Father’s Day


The 20% bonus discount is valid on full price and in-stock items at NomadGoods.com with coupon code DADSNGRADS. With many premium wireless chargers, leather iPhone 11 cases and even designer Apple Watch bands to choose from, it’s a great time to pick up a last-minute gift for the Dad or Grad on your shopping list.

As mentioned above, the coupon applies to full price and in-stock items only (medical supplies are excluded), but shoppers can enjoy greater savings on a majority of items compared to Nomad products on Amazon, which tend to sell for MSRP.

Great gift ideas

Apple hardware deals


Apple Price Guides

AppleInsider and Apple authorized resellers are also running additional exclusive deals on hardware that will not only deliver the lowest prices on many of the items, but also throw in bonus savings on AppleCare protection plans, business software and more. These offers are as follows:



https://www.sickgaming.net/blog/2020/06/...thers-day/

Print this item

  Fedora - LaTeX Typesetting – Part 1 (Lists)
Posted by: xSicKxBot - 06-16-2020, 03:10 AM - Forum: Linux, FreeBSD, and Unix types - No Replies

LaTeX Typesetting – Part 1 (Lists)

This series builds on the previous articles: Typeset your docs with LaTex and TeXstudio on Fedora and LaTeX 101 for beginners. This first part of the series is about LaTeX lists.

Types of lists


LaTeX lists are enclosed environments, and each item in the list can take a line of text to a full paragraph. There are three types of lists available in LaTeX. They are:

  • Itemized: unordered or bullet
  • Enumerated: ordered
  • Description: descriptive

Creating lists


To create a list, prefix each list item with the \item command. Precede and follow the list of items with the \begin{<type>} and \end{<type>} commands respectively where <type> is substituted with the type of the list as illustrated in the following examples.

Itemized list


\begin{itemize} \item Fedora \item Fedora Spin \item Fedora Silverblue
\end{itemize}

Enumerated list


\begin{enumerate} \item Fedora CoreOS \item Fedora Silverblue \item Fedora Spin
\end{enumerate}

Descriptive list


\begin{description} \item[Fedora 6] Code name Zod \item[Fedora 8] Code name Werewolf
\end{description}

Spacing list items


The default spacing can be customized by adding \usepackage{enumitem} to the preamble. The enumitem package enables the noitemsep option and the \itemsep command which you can use on your lists as illustrated below.

Using the noitemsep option


Enclose the noitemsep option in square brackets and place it on the \begin command as shown below. This option removes the default spacing.

\begin{itemize}[noitemsep] \item Fedora \item Fedora Spin \item Fedora Silverblue
\end{itemize}

Using the \itemsep command


The \itemsep command must be suffixed with a number to indicate how much space there should be between the list items.

\begin{itemize} \itemsep0.75pt \item Fedora Silverblue \item Fedora CoreOS
\end{itemize}

Nesting lists


LaTeX supports nested lists up to four levels deep as illustrated below.

Nested itemized lists


\begin{itemize}[noitemsep] \item Fedora Versions \begin{itemize} \item Fedora 8 \item Fedora 9 \begin{itemize} \item Werewolf \item Sulphur \begin{itemize} \item 2007-05-31 \item 2008-05-13 \end{itemize} \end{itemize} \end{itemize} \item Fedora Spin \item Fedora Silverblue
\end{itemize}

Nested enumerated lists


\begin{enumerate}[noitemsep] \item Fedora Versions \begin{enumerate} \item Fedora 8 \item Fedora 9 \begin{enumerate} \item Werewolf \item Sulphur \begin{enumerate} \item 2007-05-31 \item 2008-05-13 \end{enumerate} \end{enumerate} \end{enumerate} \item Fedora Spin \item Fedora Silverblue
\end{enumerate}

List style names for each list type



Enumerated Itemized
\alph* $\bullet$
\Alph* $\cdot$
\arabic* $\diamond$
\roman* $\ast$
\Roman* $\circ$
$-$

Default style by list depth



Level Enumerated Itemized
1 Number Bullet
2 Lowercase alphabet Dash
3 Roman numerals Asterisk
4 Uppercase alphabet Period

Setting list styles


The below example illustrates each of the different itemiszed list styles.

% Itemize style
\begin{itemize} \item[$\ast$] Asterisk \item[$\diamond$] Diamond \item[$\circ$] Circle \item[$\cdot$] Period \item[$\bullet$] Bullet (default) \item[--] Dash \item[$-$] Another dash
\end{itemize}

There are three methods of setting list styles. They are illustrated below. These methods are listed by priority; highest priority first. A higher priority will override a lower priority if more than one is defined for a list item.

List styling method 1 – per item


Enclose the name of the desired style in square brackets and place it on the \item command as demonstrated below.

% First method
\begin{itemize} \item[$\ast$] Asterisk \item[$\diamond$] Diamond \item[$\circ$] Circle \item[$\cdot$] period \item[$\bullet$] Bullet (default) \item[--] Dash \item[$-$] Another dash
\end{itemize}

List styling method 2 – on the list


Prefix the name of the desired style with label=. Place the parameter, including the label= prefix, in square brackets on the \begin command as demonstrated below.

% Second method
\begin{enumerate}[label=\Alph*.] \item Fedora 32 \item Fedora 31 \item Fedora 30
\end{enumerate}

List styling method 3 – on the document


This method changes the default style for the entire document. Use the \renewcommand to set the values for the labelitems. There is a different labelitem for each of the four label depths as demonstrated below.

% Third method
\renewcommand{\labelitemi}{$\ast$}
\renewcommand{\labelitemii}{$\diamond$}
\renewcommand{\labelitemiii}{$\bullet$}
\renewcommand{\labelitemiv}{$-$}

Summary


LaTeX supports three types of lists. The style and spacing of each of the list types can be customized. More LaTeX elements will be explained in future posts.

Additional reading about LaTeX lists can be found here: LaTeX List Structures



https://www.sickgaming.net/blog/2020/06/...t-1-lists/

Print this item

  News - Super Mario Odyssey Player Discovers Brand New Wall Clip Glitch
Posted by: xSicKxBot - 06-16-2020, 03:10 AM - Forum: Nintendo Discussion - No Replies

Super Mario Odyssey Player Discovers Brand New Wall Clip Glitch

Super Mario Odyssey

We normally look to games like The Legend of Zelda: Breath of the Wild for brand new fan discoveries, but today it’s Super Mario Odyssey‘s turn to hog the limelight.

A speedrunner going by the name of Xdxboxjaja has uploaded the following clip online, giving us a good look at what appears to be a brand new wall clip discovery. It can be performed in the Snow Kingdom and allows a player to grab that world’s 18th Power Moon, ‘Ice-Dodging Goomba Stack’ in record time.

Usually, you’d have to capture a Goomba, jump on more of them to create a stack of four, then work your way over to a button to reveal the Moon (full guides to each of the game’s Moons can be found here). With this new method, however, you can skip all of this and simply use Mario’s jumping abilities to go straight through a wall.


Xdxboxjaja believes that the new discovery should shave off around eight seconds for any speedrunners focusing on beating the game in the fastest time possible. Even if you’re not a speedrunner, though, you can still have a bit of fun trying to pull this off.

Just a few weeks ago, another Super Mario Odyssey player found a way to skip a good chunk of the final boss battle.


Thanks to iheartmcflurry for the tip!



https://www.sickgaming.net/blog/2020/06/...ip-glitch/

Print this item

  News - Invisible, Inc. Announced And Released On Nintendo Switch Today
Posted by: xSicKxBot - 06-16-2020, 03:09 AM - Forum: Lounge - No Replies

Invisible, Inc. Announced And Released On Nintendo Switch Today

Invisible, Inc., the turn-based stealth game about tactical espionage, is out today on Nintendo Switch, developer Klei announced in a tweet.

The Nintendo Switch edition includes the full game plus the Contingency Plan DLC for $20 USD. This edition also features adjusted text size to ensure readability whether you're playing docked or in handheld mode.

In GameSpot's Invisible, Inc. Console Edition review, Kevin VanOrd gave the game an 8/10, writing, "It's tense and challenging, yes, but Invisible Inc. is also simple, elegant, and always logical. It introduces new concepts in a slow drip, giving you plenty of time to work out the details. The titular spy agency is violently infiltrated, initiating a time-sensitive series of global heists and sneakabouts, each of which you control from an isometric perspective in the style of strategy games like XCOM."

Continue Reading at GameSpot

https://www.gamespot.com/articles/invisi...01-10abi2f

Print this item

  Mobile - A new Lord of the Rings mobile game is in the works
Posted by: xSicKxBot - 06-15-2020, 08:56 PM - Forum: New Game Releases - No Replies

A new Lord of the Rings mobile game is in the works

The new mobile games announcements keep on coming. NetEase and Warner Bros. have revealed that they’re working on a new strategy title based on The Lord of the Rings. Little is known about The Lord of the Rings: Rise to War apart from the genre. The Lord of the Rings: Rise to War release date is currently unknown, too. So it may be a while before you learn anything else.

“With NetEase, we have an excellent partner for The Lord of the Rings: Rise to War bringing gamers the mobile experience in this rich universe they are looking for,” says Warner Bros. president David Haddad. “This adaptation will unlock new opportunities for players to explore the iconic settings and characters of Middle-earth while utilizing their strategic skills in battle.”

This isn’t the first time NetEase and Warner Bros have worked together. NetEase is also working on a mobile RPG game with card elements based on Harry Potter. It’s called Harry Potter: Magic Awakened, and it’s currently being tested in China. Not much on a Harry Potter: Magic Awakened release date there, either – but as it’s now in beta, we have more hope that you can play that one sooner.

If you don’t fancy waiting to get your strategy fix, though, then you can always check out our best mobile strategy games article. We also have a list of upcoming mobile games, too, so you can see some of the best games releases that are over the horizon.



https://www.sickgaming.net/blog/2020/06/...the-works/

Print this item

  News - The Super Game Boy Is Now 26 Years Old
Posted by: xSicKxBot - 06-15-2020, 08:54 PM - Forum: Nintendo Discussion - No Replies

The Super Game Boy Is Now 26 Years Old


If you’re as old as some of us here are at Nintendo Life, you might have fond memories of the Super Game Boy. It was an adapter cartridge for the Super Nintendo that allowed you to play Game Boy and dual-mode Game Boy Color cartridges on the big screen – aka your television. Some games, like the Pokémon titles, even had fancy borders and colour palettes.

Today, according to Famitsu, it’s been exactly 26 years since Nintendo released this device on the Super Famicom in Japan:


This cartridge peripheral got an upgrade in 1998 with the Japan-only Super Game Boy 2, and later down the line Nintendo released the Transfer Pak (limited to certain titles) on the N64, and eventually the Game Boy Player on the GameCube. When the digital era finally arrived, it began offering its older Game Boy and Game Boy Color titles on the 3DS eShop.

Have you ever used the Super Game Boy? Do you still have one stashed away somewhere? Tell us down below.



https://www.sickgaming.net/blog/2020/06/...years-old/

Print this item

  (Indie Deal) Bloodstained: Ritual of the Night Crackerjack and more 505 Deals
Posted by: xSicKxBot - 06-15-2020, 05:56 PM - Forum: Deals or Specials - No Replies

Bloodstained: Ritual of the Night Crackerjack and more 505 Deals

Bloodstained: Ritual of the Night | a metroidvanian deal
[www.indiegala.com]
Bloodstained packs all of the best features you've come to know and love from the Metroidvania genre.
https://youtu.be/eutG4EMnDZ4
And even more 505 Games Deals
GalaQuiz today, Harry Potter-themed
[www.indiegala.com] [www.indiegala.com]

Stay Inside, Stay Safe and Enjoy Good Games.
Check out IndieGala on Twitter, YouTube & Facebook[www.facebook.com]


https://steamcommunity.com/groups/indieg...3169850167

Print this item

 
Latest Threads
???【Complete➙Travel➙Guide...
Last Post: ghunhtang45
Less than 1 minute ago
??【?Senior Travel Handboo...
Last Post: cletus.ohara
1 minute ago
?【Expert Guide】✈️ Air Mol...
Last Post: cletus.ohara
3 minutes ago
?〖Norse Atlantic Airways ...
Last Post: livia0
3 minutes ago
?⟪Canadian North Online U...
Last Post: livia0
5 minutes ago
???〖Official➝Customer➝Gui...
Last Post: ghunhtang45
7 minutes ago
【$Travel Update Required$...
Last Post: erikblack
8 minutes ago
???《Step-by-Step☆Passenge...
Last Post: ghunhtang45
8 minutes ago
【✈️ Name Change Required?...
Last Post: darrenhodge
9 minutes ago
【?Travel Emergency Help?】...
Last Post: erikblack
9 minutes ago

Forum software by © MyBB Theme © iAndrew 2016