It seems I do not see "activ" for the wifi 5.0 connected GSM and PC ??? I see then 2.4 wifi connected as being ok activ but not the 5.0 wifi ???
Answer by
Swati Dubey
It is possible that your PC does not support the 5.0 GHz WiFi frequency. Check the specifications of your computer to see if it is capable of connecting to a 5.0 GHz WiFi network. Alternatively, you may need to update your network adapter drivers or check your router settings to ensure that the 5.0 GHz band is enabled.
(i)Write a Python code to create the following Dataframe Empdf from a Dictionary: (3) EName Salary 0 Kush 10000 1 Ruchika 12000 2 Divya 20000 3 John 25000 (ii) Write python code to display the Ename and Salary having Salary more than 20000. (iii) Write python code to add a column ‘Commission’ with values as 5% of the Salary.
Answer by
Swati Dubey
The code to create the DataFrame and perform the requested operations is as follows:
import pandas as pd # Dictionary for creating DataFrame data = {'EName': ['Kush', 'Ruchika', 'Divya', 'John'], 'Salary': [10000, 12000, 20000, 25000]} # Create DataFrame from dictionary empdf = pd.DataFrame(data) # Print DataFrame print(empdf) # Display EName and Salary with Salary more than 20000 high_salary_df = empdf[empdf['Salary'] > 20000] print(high_salary_df[['EName', 'Salary']]) # Add a column 'Commission' with values as 5% of the Salary empdf['Commission'] = empdf['Salary'] * 0.05 print(empdf)
This code will create the empdf DataFrame, display the EName and Salary for those with salaries greater than 20000, and add a new column named 'Commission' with values calculated as 5% of the Salary.
It seems I do not see "activ" for the wifi 5.0 connected GSM and PC ??? I see then 2.4 wifi connected as being ok activ but not the 5.0 wifi ???
It is possible that your PC does not support the 5.0 GHz WiFi frequency. Check the specifications of your computer to see if it is capable of connecting to a 5.0 GHz WiFi network. Alternatively, you may need to update your network adapter drivers or check your router settings to ensure that the 5.0 GHz band is enabled.
(i)Write a Python code to create the following Dataframe Empdf from a Dictionary: (3)
EName Salary
0 Kush 10000
1 Ruchika 12000
2 Divya 20000
3 John 25000
(ii) Write python code to display the Ename and Salary having Salary more than 20000.
(iii) Write python code to add a column ‘Commission’ with values as 5% of the Salary.
The code to create the DataFrame and perform the requested operations is as follows:
import pandas as pd
# Dictionary for creating DataFrame
data = {'EName': ['Kush', 'Ruchika', 'Divya', 'John'],
'Salary': [10000, 12000, 20000, 25000]}
# Create DataFrame from dictionary
empdf = pd.DataFrame(data)
# Print DataFrame
print(empdf)
# Display EName and Salary with Salary more than 20000
high_salary_df = empdf[empdf['Salary'] > 20000]
print(high_salary_df[['EName', 'Salary']])
# Add a column 'Commission' with values as 5% of the Salary
empdf['Commission'] = empdf['Salary'] * 0.05
print(empdf)
This code will create the empdf DataFrame, display the EName and Salary for those with salaries greater than 20000, and add a new column named 'Commission' with values calculated as 5% of the Salary.