Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Drop rows if a set of columns has a value
Post: RE: Drop rows if a set of columns has a value

Instead of dropping the rows, you need to filter the dataframe instead, something like this: import pandas as pd small_df=pd.DataFrame(columns=['1','2','3','4','5','dist','unique']) small_df = small_...
sd_0912 Data Science 1 2,037 Sep-12-2019, 04:18 PM
    Thread: How modify the DataFrame columns
Post: RE: How modify the DataFrame columns

Not entirely sure what you're trying to do here, but something like this should work: import pandas as pd df = pd.DataFrame(columns=['Name','Category','STD']) df = df.append({'Name': 'HAJ', 'Category...
sd_0912 Data Science 2 2,474 Sep-11-2019, 04:40 PM
    Thread: run into issues while configuring visual-studio code on a win 7 machine.
Post: RE: run into issues while configuring visual-studi...

Can you be more explicit what the exact issue is? It looks like everything was installed successfully as far as I can see in the logs.
sd_0912 General Coding Help 3 3,742 Sep-11-2019, 03:55 PM
    Thread: Beginner problem, replace function with for loop
Post: RE: Beginner problem, replace function with for lo...

A more concise style for writing the loop below: list_of_aliens = [ {'name': 'name_1', 'color': 'red', 'points': 5}, {'name': 'name_2', 'color': 'blue', 'points': 10}, {'name': 'name_3', ...
sd_0912 General Coding Help 9 4,742 Sep-11-2019, 03:25 PM
    Thread: Basic Beginner question
Post: RE: Basic Beginner question

Why not simply use pandas dataframe to read the csv and filter out the row(s)? Something like this: import pandas as pd import csv df = pd.read_csv('C:\Test\Test.csv') df_filtered = df[df['Column']...
sd_0912 General Coding Help 4 2,860 Sep-11-2019, 02:53 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020